Logo mark

Two viewfinder corners and the product name. Shared by every product.

CaptureNudgeKitNudgeKit

Install

$ npx shadcn@latest add @nudgekit/logo-mark

Or with no config: npx shadcn@latest add https://ui.nudgekit.app/r/logo-mark.json

Usage

usage.tsx
import { LogoMark } from "@/components/logo-mark"

<LogoMark name="Capture" />
<LogoMark />

Do

  • Use the same mark for every NudgeKit product, with its own name.

Don't

  • Recolour or redraw the corners.

Code

What the CLI writes into your project. It is yours to change.

components/logo-mark.tsx
import * as React from "react";

import { cn } from "@/lib/utils";

export interface LogoMarkProps extends React.HTMLAttributes<HTMLSpanElement> {
  /** The product name shown next to the mark. Leave empty for the mark alone. */
  name?: string;
}

/** Two viewfinder corners in brand purple, with an optional wordmark. Every NudgeKit product shares the mark. */
function LogoMark({ name, className, ...props }: LogoMarkProps) {
  return (
    <span data-slot="logo-mark" className={cn("inline-flex items-center gap-2.5 text-[19px] font-semibold tracking-[-0.02em] text-foreground", className)} {...props}>
      <svg viewBox="0 0 24 24" className="size-6 shrink-0" fill="none" aria-hidden={name ? true : undefined} role={name ? undefined : "img"}>
        {!name && <title>NudgeKit</title>}
        <path d="M2 11V6a4 4 0 0 1 4-4h5" stroke="var(--brand)" strokeWidth="2.5" strokeLinecap="round" />
        <path d="M22 13v5a4 4 0 0 1-4 4h-5" stroke="var(--brand)" strokeWidth="2.5" strokeLinecap="round" />
      </svg>
      {name}
    </span>
  );
}

export { LogoMark };