Logo

BoardCN brand marks in square and wide badge variants.

Marks

The square mark, its mono form, and the wide badge.

function LogoDemo() {
  return (
    <div className="flex flex-wrap items-center gap-8">
      <Logo size={40} />
      <Logo size={32} mono />
      <LogoBadge size={44} />
    </div>
  );
}
function LogoDemo() {
  return (
    <div className="flex flex-wrap items-center gap-8">
      <Logo size={40} />
      <Logo size={32} mono />
      <LogoBadge size={44} />
    </div>
  );
}

Installation

npx shadcn@latest add https://boardcn.dev/r/logo.json
npx shadcn@latest add https://boardcn.dev/r/logo.json

BoardCN dependencies

The CLI installs these for you — you do not need to add them yourself.

Source

The file the CLI copies into your project.

components/foundations/brand/logo.tsx
import { useId } from "react";
import { cx } from "@/utils/cx";

export function Logo({
  size = 32,
  mono = false,
  className,
}: {
  size?: number;
  mono?: boolean;
  className?: string;
}) {
  const gradientId = useId();

  return (
    <svg
      viewBox="0 0 40 40"
      width={size}
      height={size}
      role="img"
      aria-label="BoardCN"
      className={cx("shrink-0", mono && "text-text-primary", className)}
    >
      <defs>
        <linearGradient id={gradientId} x1="5" y1="4" x2="35" y2="36" gradientUnits="userSpaceOnUse">
          <stop stopColor="#4F7CFF" />
          <stop offset="1" stopColor="#1747D1" />
        </linearGradient>
      </defs>
      <rect width="40" height="40" rx="12" fill={mono ? "currentColor" : `url(#${gradientId})`} />
      <path
        d="M11 10.5h10.25c5.1 0 8.25 2.4 8.25 6.3 0 2.25-1.15 4-3.15 4.95 2.55.85 4.15 2.8 4.15 5.35 0 4.25-3.35 6.4-9.05 6.4H11v-23Zm9.45 9.15c2.15 0 3.4-.8 3.4-2.35 0-1.5-1.25-2.25-3.4-2.25h-3.8v4.6h3.8Zm.55 9.3c2.45 0 3.8-.85 3.8-2.55 0-1.65-1.35-2.5-3.8-2.5h-4.35v5.05H21Z"
        fill={mono ? "var(--color-background-primary-default)" : "white"}
      />
    </svg>
  );
}

export function LogoBadge({
  size = 36,
  className,
  decorative = false,
  priority = false,
}: {
  size?: number;
  className?: string;
  decorative?: boolean;
  priority?: boolean;
}) {
  const gradientId = useId();

  return (
    <svg
      viewBox="0 0 48 40"
      width={size}
      height={size}
      role={decorative ? undefined : "img"}
      aria-hidden={decorative || undefined}
      aria-label={decorative ? undefined : "BoardCN"}
      className={cx("shrink-0 object-contain", className)}
      data-priority={priority || undefined}
    >
      <defs>
        <linearGradient id={gradientId} x1="5" y1="4" x2="43" y2="36" gradientUnits="userSpaceOnUse">
          <stop stopColor="#9AB4FF" />
          <stop offset="0.5" stopColor="#4975F5" />
          <stop offset="1" stopColor="#173FAE" />
        </linearGradient>
      </defs>
      <rect width="48" height="40" rx="12" fill={`url(#${gradientId})`} />
      <path d="M9 10h10c5 0 8 2.3 8 6.1 0 2.1-1.1 3.8-3 4.7 2.5.8 4 2.7 4 5.2 0 4.1-3.2 6-8.8 6H9V10Zm9.3 8.7c2.1 0 3.3-.7 3.3-2.2 0-1.4-1.2-2.1-3.3-2.1h-3.7v4.3h3.7Zm.5 8.9c2.4 0 3.7-.8 3.7-2.4 0-1.6-1.3-2.4-3.7-2.4h-4.2v4.8h4.2Z" fill="white" />
      <path d="m35.2 12.4 1.1 2.3 2.5.4-1.8 1.8.4 2.5-2.2-1.2-2.2 1.2.4-2.5-1.8-1.8 2.5-.4 1.1-2.3Z" fill="white" />
    </svg>
  );
}
import { useId } from "react";
import { cx } from "@/utils/cx";

export function Logo({
  size = 32,
  mono = false,
  className,
}: {
  size?: number;
  mono?: boolean;
  className?: string;
}) {
  const gradientId = useId();

  return (
    <svg
      viewBox="0 0 40 40"
      width={size}
      height={size}
      role="img"
      aria-label="BoardCN"
      className={cx("shrink-0", mono && "text-text-primary", className)}
    >
      <defs>
        <linearGradient id={gradientId} x1="5" y1="4" x2="35" y2="36" gradientUnits="userSpaceOnUse">
          <stop stopColor="#4F7CFF" />
          <stop offset="1" stopColor="#1747D1" />
        </linearGradient>
      </defs>
      <rect width="40" height="40" rx="12" fill={mono ? "currentColor" : `url(#${gradientId})`} />
      <path
        d="M11 10.5h10.25c5.1 0 8.25 2.4 8.25 6.3 0 2.25-1.15 4-3.15 4.95 2.55.85 4.15 2.8 4.15 5.35 0 4.25-3.35 6.4-9.05 6.4H11v-23Zm9.45 9.15c2.15 0 3.4-.8 3.4-2.35 0-1.5-1.25-2.25-3.4-2.25h-3.8v4.6h3.8Zm.55 9.3c2.45 0 3.8-.85 3.8-2.55 0-1.65-1.35-2.5-3.8-2.5h-4.35v5.05H21Z"
        fill={mono ? "var(--color-background-primary-default)" : "white"}
      />
    </svg>
  );
}

export function LogoBadge({
  size = 36,
  className,
  decorative = false,
  priority = false,
}: {
  size?: number;
  className?: string;
  decorative?: boolean;
  priority?: boolean;
}) {
  const gradientId = useId();

  return (
    <svg
      viewBox="0 0 48 40"
      width={size}
      height={size}
      role={decorative ? undefined : "img"}
      aria-hidden={decorative || undefined}
      aria-label={decorative ? undefined : "BoardCN"}
      className={cx("shrink-0 object-contain", className)}
      data-priority={priority || undefined}
    >
      <defs>
        <linearGradient id={gradientId} x1="5" y1="4" x2="43" y2="36" gradientUnits="userSpaceOnUse">
          <stop stopColor="#9AB4FF" />
          <stop offset="0.5" stopColor="#4975F5" />
          <stop offset="1" stopColor="#173FAE" />
        </linearGradient>
      </defs>
      <rect width="48" height="40" rx="12" fill={`url(#${gradientId})`} />
      <path d="M9 10h10c5 0 8 2.3 8 6.1 0 2.1-1.1 3.8-3 4.7 2.5.8 4 2.7 4 5.2 0 4.1-3.2 6-8.8 6H9V10Zm9.3 8.7c2.1 0 3.3-.7 3.3-2.2 0-1.4-1.2-2.1-3.3-2.1h-3.7v4.3h3.7Zm.5 8.9c2.4 0 3.7-.8 3.7-2.4 0-1.6-1.3-2.4-3.7-2.4h-4.2v4.8h4.2Z" fill="white" />
      <path d="m35.2 12.4 1.1 2.3 2.5.4-1.8 1.8.4 2.5-2.2-1.2-2.2 1.2.4-2.5-1.8-1.8 2.5-.4 1.1-2.3Z" fill="white" />
    </svg>
  );
}

Props

Generated from the component's TypeScript types. Standard DOM and React Aria props are omitted.

Logo

PropTypeDefaultDescription
classNamestring
monobooleanfalse
sizenumber32

LogoBadge

PropTypeDefaultDescription
classNamestring
decorativebooleanfalse
prioritybooleanfalse
sizenumber36