Skip to main content

Installation

    Usage

    showLineNumbers
    import { RainbowButton } from "@/components/ui/rainbow-button"
    
    showLineNumbers
    <RainbowButton>Rainbow Button</RainbowButton>
    

    Props

    PropTypeDefaultDescription
    childrenReact.ReactNode-The content of the button.
    classNamestring-Additional class names for the button.
    variant"default" | "outline""default"The visual variant of the button.
    size"default" | "sm" | "lg" | "icon""default"The size of the button.
    asChildbooleanfalseUse Slot to compose with other components.
    …restReact.ButtonHTMLAttributes<HTMLButtonElement>-All standard button HTML attributes are supported.

    Examples

    Outline Variant

    showLineNumbers
    <RainbowButton variant="outline">Outline Rainbow</RainbowButton>
    

    Different Sizes

    showLineNumbers
    <RainbowButton size="sm">Small</RainbowButton>
    <RainbowButton size="lg">Large</RainbowButton>
    

    Build docs developers (and LLMs) love