RDC Components

Logo

The RDC SVG logo component.

import Logo from "@/components/ui/logo"

export function LogoDemo() {
  return (
    <div className="flex items-center justify-center rounded-lg bg-white p-10">
      <Logo className="h-12" />
    </div>
  )
}

Installation

Install with the shadcn CLI. An AI assistant with the shadcn MCP server configured can also install components automatically when you ask for them (see Getting Started).

npx shadcn@latest add @rdc-ui/logo

Usage

import Logo from "@/components/ui/logo"

export function Header() {
  return <Logo className="h-8" />
}

White

Use isWhite on dark backgrounds such as Midnight Blue.

import Logo from "@/components/ui/logo"

export function LogoWhiteDemo() {
  return (
    <div className="flex items-center justify-center rounded-lg bg-(--midnight-blue) p-10">
      <Logo isWhite className="h-12" />
    </div>
  )
}

Animated

Use animate to draw the outline and fade in the fill. Combines with isWhite.

import { useState } from "react"
import Logo from "@/components/ui/logo"
import { Button } from "@/components/ui/button"

export function LogoAnimatedDemo() {
  // The key remounts Logo to restart the animation
  const [run, setRun] = useState(0)

  return (
    <div className="flex flex-col items-center gap-6 rounded-lg bg-white p-10">
      <Logo key={run} animate className="h-12" />
      <Button variant="outline" size="sm" onClick={() => setRun((current) => current + 1)}>
        Replay
      </Button>
    </div>
  )
}

API

All standard SVG attributes are supported.

PropTypeDefault
animatebooleanfalse
isWhitebooleanfalse
onAnimated() => void-
classNamestring-

onAnimated fires after the animation completes (only when animate is true).

Last updated on

On this page