UI
Design System

Components

Design System v0.7.0

Component Library

Design System›Components›Typography

Typography

Button

IconButton

SegmentedButtons

TextField

Switch

Tag

Chip

Checkbox

Tooltip

Popover

Alert

BottomSheet

Dialog

ResponsiveDialog

Toast

ResourceList

Avatar

    All typography tokens and utilities.

    Display

    Display Large

    Display Medium

    Display Small

    Headline

    Headline Large

    Headline Medium

    Headline Small

    Title

    Title Large

    Title Medium

    Title Small

    Body

    Body Large Bold

    Body Large Regular

    Body Medium Bold

    Body Medium Regular

    Body Small Bold

    Body Small Regular

    Label

    Label Large

    Label Medium Prominent

    Label Medium

    Label Small

    Label Tiny Prominent

    Label Tiny

    Button

    Stable

    Buttons allow users to take actions and make choices with a single tap. They communicate actions that users can take and are typically placed in dialogs, forms, cards, and toolbars.

    Import

    tsx
    import { Button } from "@/components/ui/button"

    Basic Usage

    tsx
    <Button variant="filled" color="primary">
      Click me
    </Button>
    
    <Button variant="outline" color="neutral" size="lg">
      <Plus className="size-4" />
      Add Item
    </Button>
    
    <Button variant="tonal" loading>
      Saving...
    </Button>

    Exports

    ButtonThe main button component
    buttonVariantsTailwind variants function for custom styling
    Interactive Playground
    Controls

    Featured Examples

    Icon Button

    tsx
    <Button variant="filled" color="primary">
      <Plus className="size-4" />
      Label
    </Button>

    Loading State

    tsx
    <Button variant="filled" color="primary" loading>
      Label
    </Button>

    Filled Variant

    Primary

    Secondary

    Neutral

    Tonal Variant

    Primary

    Secondary

    Outline Variant

    Primary

    Neutral

    Text & Plain Variants

    Text - Primary

    Plain

    Sizes

    IconButton

    Stable

    A circular button component designed to contain only an icon. Supports multiple visual variants and sizes for different use cases and contexts.

    Import

    tsx
    import { IconButton } from "@/components/ui/icon-button"

    Basic Usage

    tsx
    <IconButton variant="standard">
      <Settings />
    </IconButton>
    
    <IconButton variant="filled" size="small">
      <Plus />
    </IconButton>
    
    <IconButton variant="outlined" disabled>
      <Heart />
    </IconButton>
    Interactive Playground
    Controls

    Props

    Prop
    Type
    Default
    Description
    variant
    "standard" | "filled" | "tonal-neutral" | "outlined"
    "standard"

    The visual style variant of the icon button.

    size
    "baseline" | "small"
    "baseline"

    The size of the icon button. Baseline is 40px, small is 32px.

    disabled
    boolean
    false

    When true, the button is disabled and cannot be interacted with.

    asChild
    boolean
    false

    When true, the button will render its child as the root element using Radix Slot.

    children
    React.ReactNode
    —

    The icon element to display inside the button. Should be an SVG icon component.

    className
    string
    —

    Additional CSS classes to apply to the button.

    onClick
    (event: MouseEvent) => void
    —

    Callback function called when the button is clicked.

    Featured Examples

    Standard Icon Button

    tsx
    <IconButton variant="standard">
      <Settings />
    </IconButton>

    Filled Icon Button

    tsx
    <IconButton variant="filled">
      <Settings />
    </IconButton>

    Baseline Size

    Standard
    Filled
    Tonal Neutral
    Outlined

    Small Size

    Standard
    Filled
    Tonal Neutral
    Outlined

    All States (Baseline)

    VariantEnabledDisabled
    Standard
    Filled
    Tonal Neutral
    Outlined

    Common Use Cases

    Close
    Menu
    Search
    Add
    Favorite
    Share
    More
    Notifications

    Toolbar Example

    Pagination Example

    Page 1 of 10

    Quantity Selector

    1

    SegmentedButtons

    Stable

    Segmented buttons help people select from two to five options. Use for simple choices or multi-selection scenarios.

    Import

    tsx
    import { SegmentedButtons } from "@/components/ui/segmented-buttons"

    Basic Usage

    tsx
    <SegmentedButtons
      options={[
        { value: "v1", label: "Value 1" },
        { value: "v2", label: "Value 2" }
      ]}
      value={value}
      onChange={setValue}
    />

    Featured Examples

    Single Select

    tsx
    <SegmentedButtons
      options={[
        { value: "option1", label: "Option 1" },
        { value: "option2", label: "Option 2" },
        { value: "option3", label: "Option 3" },
      ]}
      value={singleSelect}
      onChange={setSingleSelect}
    />

    Multi Select

    tsx
    <SegmentedButtons
      multiSelect
      options={[
        { value: "option1", label: "Option 1" },
        { value: "option2", label: "Option 2" },
        { value: "option3", label: "Option 3" },
      ]}
      value={multiSelect}
      onChange={setMultiSelect}
    />

    Single Select

    Multi Select

    With Icons

    Multiline

    Density

    Density 0 (Default)

    Density -1 (Compact)

    Real-World Examples

    View Mode Selector

    Media Type Filter

    Notification Settings (Multi-select)

    Account Type (Multiline)

    States

    StateExample
    Default (unselected)
    Selected
    Multi-select
    Compact (Density -1)

    TextField

    Stable

    TextField is a form input component that allows users to enter and edit text. It features a floating label that animates when focused, support for icons, prefix/suffix text, validation states, and a clear button. The component is built with accessibility in mind and supports both controlled and uncontrolled modes.

    Import

    tsx
    import { TextField } from "@/components/ui/text-field"

    Basic Usage

    tsx
    // Basic usage
    <TextField label="Name" placeholder="Enter your name" />
    
    // With icon and supporting text
    <TextField
      label="Search"
      startIcon={<Search className="size-5" />}
      supportingText="Search for products, categories, etc."
    />
    
    // With prefix/suffix
    <TextField label="Price" prefix="$" suffix="USD" />
    
    // Error state with validation
    <TextField
      label="Email"
      error
      errorText="Please enter a valid email address"
    />
    
    // With clear button
    <TextField
      label="Search"
      showClearButton
      onClear={() => console.log('Cleared!')}
    />

    Exports

    TextFieldThe main text field input component
    textFieldVariantsTailwind variants function for custom styling
    Interactive Playground

    Supporting text

    Controls

    Featured Examples

    With Start Icon

    Enter your query

    tsx
    <TextField
      label="Search"
      placeholder="Search..."
      startIcon={<Search className="size-5" />}
      supportingText="Enter your query"
    />

    Error State

    Please enter a valid email

    tsx
    <TextField
      label="Email"
      defaultValue="invalid-email"
      error
      errorText="Please enter a valid email"
    />

    Basic States

    Default

    Supporting text

    With Value

    Supporting text

    Error

    Inline error text

    Disabled

    Supporting text

    Placeholder Only

    Supporting text

    Sizes

    Small
    Medium (Default)
    Large

    With Icons

    Left Icon

    Supporting text

    Right Icon

    Supporting text

    Both Icons

    Supporting text

    Prefix & Suffix

    Prefix
    $

    Supporting text

    Suffix
    %

    Supporting text

    Both (Toggle)
    $
    %

    Supporting text

    Real-world Examples

    Login Form

    Contact Form

    Payment Form

    $
    %

    Validation Example

    Username is available

    Please enter a valid email address

    Password must be at least 8 characters

    Switch

    Stable

    Toggle switches allow users to turn a single option on or off. They are the preferred way to adjust settings on mobile devices. The switch component supports icons to reinforce the on/off state visually and can be used in both controlled and uncontrolled modes.

    Import

    tsx
    import { Switch } from "@/components/ui/switch"

    Basic Usage

    tsx
    const [isEnabled, setIsEnabled] = useState(false)
    
    <Switch 
      checked={isEnabled} 
      onCheckedChange={setIsEnabled}
      showIcon
    />
    Interactive Playground
    On
    Controls

    Props

    Prop
    Type
    Default
    Description
    checked
    boolean
    undefined

    The controlled checked state of the switch.

    defaultChecked
    boolean
    false

    The default checked state when initially rendered (uncontrolled).

    onCheckedChange
    (checked: boolean) => void
    undefined

    Callback fired when the checked state changes.

    showIcon
    boolean
    false

    Whether to display check/X icons inside the thumb.

    disabled
    boolean
    false

    When true, prevents user interaction with the switch.

    required
    boolean
    false

    When true, indicates the switch must be checked for form submission.

    name
    string
    undefined

    The name of the switch for form submission.

    value
    string
    "on"

    The value submitted with form data when checked.

    className
    string
    undefined

    Additional CSS classes to apply to the switch root.

    Featured Examples

    Basic Switch

    tsx
    <Switch defaultChecked />

    With Icon

    tsx
    <Switch defaultChecked showIcon />

    Disabled (On)

    tsx
    <Switch defaultChecked disabled />

    Disabled (Off)

    tsx
    <Switch disabled />

    No Icon Variant

    On State

    Enabled
    Hover
    Focus
    Pressed
    Disabled

    Off State

    Enabled
    Hover
    Focus
    Pressed
    Disabled

    With Icon Variant

    On State

    Enabled
    Hover
    Focus
    Pressed
    Disabled

    Off State

    Enabled
    Hover
    Focus
    Pressed
    Disabled

    Real-world Examples

    Notification Settings

    Email Notifications

    Receive updates via email

    Push Notifications

    Get instant alerts

    Privacy Settings

    Public Profile

    Anyone can see your profile

    Show Activity Status

    Let others see when you're online

    Tag

    Stable

    Tags are versatile labeling components commonly used for categorization, filtering, status indication, and user-generated content like selected items in multi-select inputs.

    Import

    tsx
    import { Tag } from "@/components/ui/tag"

    Basic Usage

    tsx
    <Tag variant="filled" color="primary">Label</Tag>
    
    <Tag variant="tonal" color="success" closable onClose={() => {}}>
      Removable
    </Tag>
    
    <Tag 
      color="secondary" 
      leadingIcon={<Zap className="size-full" />}
    >
      With Icon
    </Tag>
    Interactive Playground
    Label
    Controls

    Props

    Prop
    Type
    Default
    Description
    variant
    "filled" | "tonal"
    "filled"

    The visual style variant of the tag. Filled has solid background, tonal has lighter background.

    color
    "neutral" | "success" | "error" | "warning" | "primary" | "secondary"
    "neutral"

    The semantic color of the tag for different use cases.

    size
    "tiny" | "baseline"
    "baseline"

    The size of the tag. Tiny is smaller for compact layouts.

    leadingIcon
    React.ReactNode
    undefined

    Optional icon element displayed before the tag label.

    closable
    boolean
    false

    When true, displays a close button to remove the tag.

    onClose
    (e: React.MouseEvent<HTMLButtonElement>) => void
    undefined

    Callback function triggered when the close button is clicked.

    children
    React.ReactNode
    -

    The content/label of the tag.

    className
    string
    undefined

    Additional CSS classes to apply to the tag.

    Featured Examples

    Closable Tag

    Label
    tsx
    <Tag
      variant="filled"
      color="primary"
      closable
      onClose={() => alert("close")}
    >
      Label
    </Tag>

    Tag with Icon

    Label
    tsx
    <Tag
      variant="tonal"
      color="secondary"
      leadingIcon={<Zap className="size-full" />}
    >
      Label
    </Tag>

    Filled Variant

    Tiny Size

    LabelLabelLabelLabelLabelLabel

    Baseline Size

    LabelLabelLabelLabelLabelLabel

    With Close Button

    LabelLabelLabelLabelLabelLabel

    With Leading Icon

    LabelLabelLabel

    Tonal Variant

    Baseline Size

    LabelLabelLabelLabelLabelLabel

    With Close Button

    LabelLabelLabel

    Chip

    Stable

    Chips are compact interactive elements used for filtering content, entering information, or triggering actions. They support three types: filter chips for selecting options, input chips for user-entered data, and assistive chips for smart suggestions.

    Import

    tsx
    import { Chip } from "@/components/ui/chip"

    Basic Usage

    tsx
    <Chip type="filter" variant="outlined" selected>
      Active Filter
    </Chip>
    
    <Chip type="input" onClose={() => handleRemove()}>
      john@example.com
    </Chip>
    
    <Chip type="assistive" leadingIcon={<Calendar />}>
      Add to calendar
    </Chip>
    Interactive Playground
    Controls

    Props

    Prop
    Type
    Default
    Description
    type
    "filter" | "assistive" | "input"
    "filter"

    The type of chip that determines its behavior and appearance.

    variant
    "outlined" | "tonal"
    "outlined"

    The visual style variant of the chip.

    color
    "neutral" | "green" | "red" | "blue" | "yellow" | "purple"
    "neutral"

    The color scheme for tonal variant chips.

    selected
    boolean
    false

    Whether the chip is in a selected state.

    leadingIcon
    ReactNode
    undefined

    Icon displayed before the chip label.

    trailingIcon
    ReactNode
    undefined

    Icon displayed after the chip label (hidden when onClose is provided).

    avatar
    ReactNode
    undefined

    Avatar element displayed at the start of the chip.

    onClose
    () => void
    undefined

    Callback when the close button is clicked. Shows close button when provided.

    showCheckmark
    boolean
    true

    Whether to show checkmark icon when filter chip is selected (outlined only).

    disabled
    boolean
    false

    Whether the chip is disabled.

    className
    string
    undefined

    Additional CSS classes to apply to the chip.

    Featured Examples

    Filter Chip

    tsx
    <Chip
      type="filter"
      variant="outlined"
      leadingIcon={<Filter className="h-4 w-4" />}
      selected
    >
      Filter
    </Chip>

    Input Chip with Close

    tsx
    <Chip
      type="input"
      variant="outlined"
      leadingIcon={<User className="h-4 w-4" />}
      onClose={() => {}}
    >
      John Doe
    </Chip>

    Filter Chip - Outlined

    Unselected (Inherit)

    Selected

    Filter Chip - Tonal

    Color Variants (Unselected)

    Color Variants (Selected)

    Assistive Chip

    Assistive chips represent smart or automated actions that can span multiple apps, such as opening a calendar event from a message.

    Input Chip

    Input chips represent discrete pieces of information entered by a user, such as contacts or filter options within a search field.

    Unselected

    Selected

    Checkbox

    Stable

    The Checkbox component allows users to select one or multiple options from a set. It supports checked, unchecked, and indeterminate states, making it ideal for binary choices, multi-selection lists, and hierarchical selection patterns like "select all" functionality.

    Import

    tsx
    import { Checkbox } from "@/components/ui/checkbox"

    Basic Usage

    tsx
    <Checkbox label="I agree to terms" />
    
    // With helper text
    <Checkbox 
      label="Subscribe to newsletter" 
      helperText="Receive updates about new features"
    />
    
    // Indeterminate state (partial selection)
    <Checkbox checked="indeterminate" label="Select all" />
    
    // With error state
    <Checkbox error label="Required field" />
    Interactive Playground
    Controls

    Props

    Prop
    Type
    Default
    Description
    checked
    boolean | 'indeterminate'
    undefined

    The controlled checked state of the checkbox. Can be true, false, or 'indeterminate' for partial selection.

    defaultChecked
    boolean
    false

    The default checked state when initially rendered. Use when you do not need to control its checked state.

    onCheckedChange
    (checked: boolean | 'indeterminate') => void
    undefined

    Event handler called when the checked state changes.

    error
    boolean
    false

    Shows error state styling with red border and background.

    label
    string
    undefined

    Label text displayed next to the checkbox.

    helperText
    string
    undefined

    Helper or description text displayed below the label.

    link
    React.ReactNode
    undefined

    Link element to display after the label, useful for terms and conditions.

    labelPosition
    'left' | 'right'
    'right'

    Position of the label relative to the checkbox.

    disabled
    boolean
    false

    When true, prevents the user from interacting with the checkbox.

    required
    boolean
    false

    When true, indicates that the user must check the checkbox before the form can be submitted.

    name
    string
    undefined

    The name of the checkbox. Submitted with its owning form as part of a name/value pair.

    value
    string
    'on'

    The value given as data when submitted with a name.

    className
    string
    undefined

    Additional CSS classes to apply to the checkbox.

    Featured Examples

    With Helper Text

    Helper text
    tsx
    <Checkbox
      defaultChecked
      label="Adjacent label"
      helperText="Helper text"
    />

    Indeterminate State

    tsx
    <Checkbox checked="indeterminate" label="Select all" />

    Error State

    This field is required
    tsx
    <Checkbox
      error
      label="Accept terms"
      helperText="This field is required"
    />

    With Link

    Terms of Service
    tsx
    <Checkbox
      label="I agree to the"
      link={<a href="#" className="text-secondary hover:underline">Terms of Service</a>}
    />

    Basic States

    Checked

    Default
    Disabled
    Error

    Indeterminate

    Default
    Disabled
    Error

    Unchecked

    Default
    Disabled
    Error

    With Labels

    Real Usage Examples

    Terms and Conditions

    Terms of Service
    Privacy Policy
    Receive updates about new features

    Selection Group

    Tooltip

    Stable

    Tooltips display informative text when users hover over, focus on, or tap an element. They are used to provide additional context or explain the function of an interface element without cluttering the UI with permanent text.

    Import

    tsx
    import {
      Tooltip, 
      TooltipTrigger, 
      TooltipContent, 
      TooltipProvider 
    } from "@/components/ui/tooltip"

    Basic Usage

    tsx
    <TooltipProvider>
      <Tooltip>
        <TooltipTrigger>Hover me</TooltipTrigger>
        <TooltipContent>Tooltip content</TooltipContent>
      </Tooltip>
    </TooltipProvider>

    Exports

    TooltipRoot component for a single tooltip.
    TooltipTriggerElement that triggers the tooltip.
    TooltipContentContainer for the tooltip text.
    TooltipProviderContext provider, wrap your app or section with this.
    Interactive Playground
    Controls

    API Reference

    TooltipContent Props

    Prop
    Type
    Default
    Description
    children
    React.ReactNode
    —

    The content to display inside the tooltip.

    side
    "top" | "bottom" | "left" | "right"
    "bottom"

    The preferred side of the trigger to render the tooltip.

    align
    "start" | "center" | "end"
    "center"

    The alignment of the tooltip relative to the trigger.

    sideOffset
    number
    8

    The distance in pixels from the trigger.

    multiline
    boolean
    false

    Whether the tooltip should wrap text across multiple lines.

    className
    string
    —

    Additional CSS classes to apply to the tooltip content.

    Tooltip Props

    Prop
    Type
    Default
    Description
    open
    boolean
    —

    Controlled open state of the tooltip.

    defaultOpen
    boolean
    false

    The default open state when uncontrolled.

    onOpenChange
    (open: boolean) => void
    —

    Callback when the open state changes.

    delayDuration
    number
    0

    The delay in milliseconds before the tooltip opens.

    Featured Examples

    Top Placement

    tsx
    <Tooltip>
      <TooltipTrigger asChild>
        <Button variant="outline" color="neutral">
          Top
        </Button>
      </TooltipTrigger>
      <TooltipContent side="top">Tooltip on top</TooltipContent>
    </Tooltip>

    Multiline Tooltip

    tsx
    <Tooltip>
      <TooltipTrigger asChild>
        <Button variant="outline" color="neutral">
          Hover for details
        </Button>
      </TooltipTrigger>
      <TooltipContent multiline>
        This is a longer tooltip with multiple lines of text.
      </TooltipContent>
    </Tooltip>

    Placement

    Alignment

    Start
    Center
    End

    Icon Buttons with Tooltips

    Tooltips are especially useful for icon-only buttons where the action might not be immediately clear.

    Multiline Tooltips

    Use the multiline prop when you need to display longer descriptions that should wrap across multiple lines.

    Popover

    Stable

    Popovers display rich content in a portal, triggered by a button or other interactive element. Unlike tooltips which are for simple text hints, popovers can contain complex content like forms, lists, and interactive elements. They remain open until explicitly dismissed.

    Import

    tsx
    import {
      Popover,
      PopoverTrigger,
      PopoverContent,
      PopoverHeader,
      PopoverTitle,
      PopoverDescription,
      PopoverBody,
      PopoverFooter,
      PopoverClose,
      PopoverAnchor,
    } from "@/components/ui/popover"

    Basic Usage

    tsx
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="outline">Open</Button>
      </PopoverTrigger>
      <PopoverContent>
        <PopoverHeader>
          <PopoverTitle>Title</PopoverTitle>
        </PopoverHeader>
        <PopoverBody>
          <p>Popover content goes here.</p>
        </PopoverBody>
        <PopoverFooter>
          <PopoverClose asChild>
            <Button size="sm">Close</Button>
          </PopoverClose>
        </PopoverFooter>
      </PopoverContent>
    </Popover>

    Exports

    PopoverRoot component that manages the popover state.
    PopoverTriggerElement that triggers the popover on click.
    PopoverContentContainer for the popover content with styling and animations.
    PopoverHeaderOptional header section with bottom border.
    PopoverTitleTitle element for the popover header.
    PopoverDescriptionDescription text element.
    PopoverBodyMain content area with padding.
    PopoverFooterFooter section for action buttons with top border.
    PopoverCloseButton that closes the popover when clicked.
    PopoverAnchorAlternative anchor for positioning.
    Interactive Playground
    Controls

    API Reference

    PopoverContent Props

    Prop
    Type
    Default
    Description
    children
    React.ReactNode
    —

    The content to display inside the popover.

    side
    "top" | "bottom" | "left" | "right"
    "bottom"

    The preferred side of the trigger to render the popover.

    align
    "start" | "center" | "end"
    "center"

    The alignment of the popover relative to the trigger.

    sideOffset
    number
    8

    The distance in pixels from the trigger.

    size
    "sm" | "md" | "lg" | "auto"
    "md"

    The width of the popover content.

    showArrow
    boolean
    true

    Whether to show the arrow pointing to the trigger.

    showCloseButton
    boolean
    false

    Whether to show a close button in the top-right corner.

    className
    string
    —

    Additional CSS classes to apply to the popover content.

    Popover Props

    Prop
    Type
    Default
    Description
    open
    boolean
    —

    Controlled open state of the popover.

    defaultOpen
    boolean
    false

    The default open state when uncontrolled.

    onOpenChange
    (open: boolean) => void
    —

    Callback when the open state changes.

    modal
    boolean
    false

    Whether the popover should be modal (trap focus and block interaction outside).

    Sub-Components

    Prop
    Type
    Default
    Description
    PopoverHeader
    React.HTMLAttributes<HTMLDivElement>
    —

    Container for the header section with border-bottom styling.

    PopoverTitle
    React.HTMLAttributes<HTMLHeadingElement>
    —

    Title element with text-title-md styling.

    PopoverDescription
    React.HTMLAttributes<HTMLParagraphElement>
    —

    Description text with text-body-sm-regular styling.

    PopoverBody
    React.HTMLAttributes<HTMLDivElement>
    —

    Main content area with padding.

    PopoverFooter
    React.HTMLAttributes<HTMLDivElement>
    —

    Footer section for actions with border-top styling.

    PopoverClose
    React.ComponentProps<typeof PopoverPrimitive.Close>
    —

    Button that closes the popover when clicked.

    PopoverAnchor
    React.ComponentProps<typeof PopoverPrimitive.Anchor>
    —

    Alternative anchor element for positioning the popover.

    Featured Examples

    Basic Popover

    tsx
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="outline">Simple</Button>
      </PopoverTrigger>
      <PopoverContent>
        <PopoverBody>
          <p>Basic popover content.</p>
        </PopoverBody>
      </PopoverContent>
    </Popover>

    With Close Button

    tsx
    <Popover>
      <PopoverTrigger asChild>
        <Button variant="outline">With Close</Button>
      </PopoverTrigger>
      <PopoverContent showCloseButton>
        <PopoverHeader>
          <PopoverTitle>Notification</PopoverTitle>
        </PopoverHeader>
        <PopoverBody>
          <p>Click the X to close.</p>
        </PopoverBody>
      </PopoverContent>
    </Popover>

    Sizes

    The popover comes in four width sizes: small (224px), medium (288px), large (384px), and auto (content-based).

    Positions

    Control where the popover appears relative to the trigger using the side prop.

    Real World Examples

    Popovers are ideal for contextual actions, user profiles, settings panels, and share menus.

    Alert

    Stable

    Alerts provide contextual feedback messages for user actions or system events. They support four semantic types (informative, warning, error, success), optional action buttons, dismissible behavior, and multiple layout orientations.

    Import

    tsx
    import { Alert } from "@/components/ui/alert"

    Basic Usage

    tsx
    <Alert
      type="informative"
      title="Info title"
      description="This is an alert for contextual feedback."
    />
    
    <Alert
      type="success"
      title="Done!"
      description="Your changes were saved successfully."
      actionLabel="Undo"
      onAction={() => {}}
      dismissible
      onDismiss={() => {}}
    />

    Alert Types

    Four semantic types for different contexts: informative, warning, error, and success.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    With Action Button

    Alerts can include an action button for user interaction.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    With Chevron

    Use a chevron to indicate navigable alerts.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Dismissible

    Alerts that can be dismissed by the user.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Default (No Action)

    Simple alerts without any action elements.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Vertical Layout (Small Screens)

    Vertical layout optimized for small screens with action button below content.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Compact Size

    Smaller alerts for denser UIs.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Info title

    This is an alert meant to give context to the user inside the app.

    Without Title

    Alerts with only description text.

    This is an alert meant to give context to the user inside the app.

    This is an alert meant to give context to the user inside the app.

    This is an alert meant to give context to the user inside the app.

    This is an alert meant to give context to the user inside the app.

    Custom Icons

    Alerts with custom icons for specific use cases.

    Security Update

    Your account security has been enhanced with two-factor authentication.

    Performance Boost

    Your app is now running 50% faster with the latest optimizations.

    Real-World Examples

    Common use cases for alerts in applications.

    Maintenance scheduled

    The system will be unavailable on Sunday from 2:00 AM to 4:00 AM for scheduled maintenance.

    Storage almost full

    You've used 90% of your storage quota. Consider upgrading your plan or deleting unused files.

    Payment failed

    We couldn't process your payment. Please update your payment method to continue using the service.

    Account verified

    Your email has been verified successfully. You now have full access to all features.

    BottomSheet

    Stable

    Bottom sheets slide up from the bottom of the screen to display additional content or actions.

    Import

    tsx
    import {
      BottomSheet, 
      BottomSheetTrigger, 
      BottomSheetContent, 
      BottomSheetHeader, 
      BottomSheetTitle, 
      BottomSheetDescription, 
      BottomSheetBody, 
      BottomSheetFooter 
    } from "@/components/ui/bottom-sheet"

    Basic Usage

    tsx
    <BottomSheet>
      <BottomSheetTrigger>Open</BottomSheetTrigger>
      <BottomSheetContent>
        <BottomSheetHeader>
          <BottomSheetTitle>Title</BottomSheetTitle>
          <BottomSheetDescription>Description</BottomSheetDescription>
        </BottomSheetHeader>
        <BottomSheetBody>Content</BottomSheetBody>
        <BottomSheetFooter>Footer</BottomSheetFooter>
      </BottomSheetContent>
    </BottomSheet>

    Exports

    BottomSheetRoot component that manages the open state.
    BottomSheetTriggerButton that opens the bottom sheet.
    BottomSheetContentContainer for the bottom sheet content.
    BottomSheetHeaderHeader section, typically for title and description.
    BottomSheetTitleAccessible title for the bottom sheet.
    BottomSheetDescriptionAccessible description for the bottom sheet.
    BottomSheetBodyMain content area.
    BottomSheetFooterFooter section, typically for actions.
    BottomSheetListItemHelper component for list items.

    Featured Examples

    Standard Bottom Sheet

    tsx
    <BottomSheet>
      <BottomSheetTrigger asChild>
        <Button variant="outline">Open Standard</Button>
      </BottomSheetTrigger>
      <BottomSheetContent variant="standard">
        <BottomSheetHeader>
          <BottomSheetTitle>Standard Sheet</BottomSheetTitle>
          <BottomSheetDescription>
            Interacts with background.
          </BottomSheetDescription>
        </BottomSheetHeader>
        <BottomSheetBody>
          Content goes here.
        </BottomSheetBody>
      </BottomSheetContent>
    </BottomSheet>

    Modal Bottom Sheet

    tsx
    <BottomSheet>
      <BottomSheetTrigger asChild>
        <Button variant="filled">Open Modal</Button>
      </BottomSheetTrigger>
      <BottomSheetContent variant="modal">
        <BottomSheetHeader>
          <BottomSheetTitle>Modal Sheet</BottomSheetTitle>
          <BottomSheetDescription>
            Blocks background.
          </BottomSheetDescription>
        </BottomSheetHeader>
        <BottomSheetBody>
          Content goes here.
        </BottomSheetBody>
        <BottomSheetFooter>
          <BottomSheetClose asChild>
            <Button variant="filled" className="w-full">
              Close
            </Button>
          </BottomSheetClose>
        </BottomSheetFooter>
      </BottomSheetContent>
    </BottomSheet>

    Variants

    List Items

    With Thumbnail

    With Image

    Options

    Dialog

    Stable

    Dialogs inform users about a task and can contain critical information, require decisions, or involve multiple tasks.

    Import

    tsx
    import {
      Dialog, 
      DialogTrigger, 
      DialogContent, 
      DialogHeader, 
      DialogFooter, 
      DialogTitle, 
      DialogDescription,
      DialogClose,
      DialogIcon
    } from "@/components/ui/dialog"

    Basic Usage

    tsx
    <Dialog>
      <DialogTrigger>Open</DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Title</DialogTitle>
          <DialogDescription>Description</DialogDescription>
        </DialogHeader>
        <DialogFooter>
          <DialogClose>Close</DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>

    Exports

    DialogRoot component.
    DialogTriggerTrigger button.
    DialogContentContainer for dialog content.
    DialogHeaderHeader section.
    DialogFooterFooter section for actions.
    DialogTitleAccessible title.
    DialogDescriptionAccessible description.
    DialogCloseButton to close the dialog.
    DialogIconWrapper for icon in header.

    Featured Examples

    Basic Dialog

    tsx
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="outline">Open Dialog</Button>
      </DialogTrigger>
      <DialogContent size="sm">
        <DialogHeader>
          <DialogTitle>Dialog Title</DialogTitle>
          <DialogDescription>
            This is a small dialog with basic content.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter>
          <DialogClose asChild>
            <Button variant="text">Cancel</Button>
          </DialogClose>
          <DialogClose asChild>
            <Button variant="filled">Accept</Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>

    Success Dialog

    tsx
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="outline" color="secondary">
          Success Dialog
        </Button>
      </DialogTrigger>
      <DialogContent size="sm">
        <DialogHeader className="items-center text-center">
          <DialogIcon variant="success">
            <Check className="h-6 w-6" />
          </DialogIcon>
          <DialogTitle>Success!</DialogTitle>
          <DialogDescription>
            Your changes have been saved successfully.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter className="sm:justify-center">
          <DialogClose asChild>
            <Button variant="filled">Continue</Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>

    Basic Dialogs

    Icon Dialogs

    Without Close Button

    Real-world Examples

    Size Comparison

    SizeMax WidthUse CaseExample
    sm384pxSimple confirmations, alerts
    md448pxForms, detailed info
    lg512pxComplex content, settings

    ResponsiveDialog

    Stable

    A component that adapts its behavior based on the device screen size: acting as a Bottom Sheet on mobile and a Dialog on desktop.

    Import

    tsx
    import { 
      ResponsiveDialog, 
      ResponsiveDialogTrigger, 
      ResponsiveDialogContent, 
      ResponsiveDialogHeader, 
      ResponsiveDialogFooter, 
      ResponsiveDialogTitle, 
      ResponsiveDialogDescription,
      ResponsiveDialogBody,
      ResponsiveDialogClose
    } from "@/components/ui/responsive-dialog"

    Basic Usage

    tsx
    <ResponsiveDialog>
      <ResponsiveDialogTrigger>Open</ResponsiveDialogTrigger>
      <ResponsiveDialogContent>
        <ResponsiveDialogHeader>
          <ResponsiveDialogTitle>Title</ResponsiveDialogTitle>
          <ResponsiveDialogDescription>Description</ResponsiveDialogDescription>
        </ResponsiveDialogHeader>
        <ResponsiveDialogBody>Content</ResponsiveDialogBody>
        <ResponsiveDialogFooter>
          <ResponsiveDialogClose>Close</ResponsiveDialogClose>
        </ResponsiveDialogFooter>
      </ResponsiveDialogContent>
    </ResponsiveDialog>

    Exports

    ResponsiveDialogRoot component that handles switching between Dialog and BottomSheet.
    ResponsiveDialogTriggerTrigger button.
    ResponsiveDialogContentContent container.
    ResponsiveDialogHeaderHeader section.
    ResponsiveDialogFooterFooter section.
    ResponsiveDialogTitleAccessible title.
    ResponsiveDialogDescriptionAccessible description.
    ResponsiveDialogBodyMain content body.
    ResponsiveDialogCloseClose button.

    Basic Examples

    Toast

    Stable

    Toasts provide brief messages about app processes at the bottom of the screen.

    Import

    tsx
    import { Toaster } from "@/components/ui/toaster"
    import { useToast } from "@/hooks/use-toast"

    Basic Usage

    tsx
    // In your layout or root component
    <Toaster />
    
    // In your component
    const { toast } = useToast()
    
    toast({
      title: "Scheduled: Catch up",
      description: "Friday, February 10, 2023 at 5:57 PM",
    })

    Exports

    ToasterComponent to render toasts, place at app root.
    useToastHook to trigger toasts.
    ToastActionAction button within a toast.

    Featured Examples

    Basic Toast

    tsx
    <Button
      variant="outline"
      onClick={() => {
        toast({
          description: "Single-line snackbar",
        })
      }}
    >
      Show Toast
    </Button>

    Toast with Action

    tsx
    <Button
      variant="outline"
      onClick={() => {
        toast({
          description: "Snackbar with action",
          action: <ToastAction altText="Undo">Undo</ToastAction>,
        })
      }}
    >
      Show Toast
    </Button>

    Single Line

    Two Line

    Error Variant

    Static Preview

    Real World Examples

    ResourceList

    Stable

    ResourceList displays a collection of items in a vertical list format. It supports three rendering patterns: by items array, with custom renderItem function, or by composition with children. Each item can have leading elements (icons, avatars, thumbnails), content (headline and body text), and trailing elements (prices, actions, chevrons).

    Import

    tsx
    import {
      ResourceList,
      ResourceListItem,
      ResourceListLeading,
      ResourceListContent,
      ResourceListTrailing,
      ResourceListAvatar,
      ResourceListThumbnail,
      ResourceListPrice,
      ResourceListAction,
      ResourceListChevron,
    } from "@/components/ui/resource-list"

    Basic Usage

    tsx
    // Pattern 1: Using children (composition)
    <ResourceList borderStyle="outlined">
      <ResourceListItem onClick={() => {}}>
        <ResourceListLeading>
          <ResourceListAvatar>
            <ReceiptIcon />
          </ResourceListAvatar>
        </ResourceListLeading>
        <ResourceListContent headline="Item Title" body="Description" />
        <ResourceListTrailing label="$100.00" />
      </ResourceListItem>
    </ResourceList>
    
    // Pattern 2: Using items array
    <ResourceList 
      items={items} 
      borderStyle="underline"
      hasContainer
    />
    
    // Pattern 3: Using renderItem for custom rendering
    <ResourceList
      items={items}
      renderItem={(item, index) => (
        <ResourceListItem key={item.id}>
          <ResourceListContent headline={item.headline} />
        </ResourceListItem>
      )}
    />

    Exports

    ResourceListMain container component
    ResourceListItemIndividual list item
    ResourceListLeadingContainer for leading elements
    ResourceListContentMain text content (headline + body)
    ResourceListTrailingContainer for trailing elements
    ResourceListAvatarAvatar element for leading slot
    ResourceListThumbnailImage thumbnail for leading slot
    ResourceListPricePrice display with optional discount
    ResourceListActionAction button for trailing slot
    ResourceListChevronNavigation chevron icon
    Interactive Playground
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    Controls

    Border Styles

    Underline items

    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small

    Outlined items

    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small

    No border items

    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small

    Underlined + Container

    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small
    HeadlineBody small
    Prominent labelLabel small

    With Avatar

    Avatar Items

    Sandwich, Coffee &...Multiple payments
    $5,000.002 links
    Gustavo ColoradoBBVA --6480
    BeneficiarioMaría Casanova
    tsx
                <ResourceList>
                  <ResourceListItem onClick={() => console.log('clicked')}>
                    <ResourceListLeading>
                      <ResourceListAvatar>
                        <ReceiptIcon className="w-5 h-5" />
                      </ResourceListAvatar>
                    </ResourceListLeading>
                    <ResourceListContent headline="Sandwich, Coffee &..." body="Multiple payments" />
                    <ResourceListTrailing label="$5,000.00" body="2 links" />
                  </ResourceListItem>
                  <ResourceListItem>
                    <ResourceListLeading>
                      <ResourceListAvatar variant="accent" fallback="G" />
                    </ResourceListLeading>
                    <ResourceListContent headline="Gustavo Colorado" body="BBVA --6480" />
                  </ResourceListItem>
                  <ResourceListItem>
                    <ResourceListLeading>
                      <ResourceListAvatar fallback="M" />
                    </ResourceListLeading>
                    <ResourceListContent headline="Beneficiario" body="María Casanova" />
                    <ResourceListTrailing>
                      <button className="p-1 hover:bg-surface-container-highest rounded transition-colors">
                        <CopyIcon className="w-5 h-5 text-on-surface-variant" />
                      </button>
                    </ResourceListTrailing>
                  </ResourceListItem>
                </ResourceList>

    With Thumbnail

    Thumbnail Items

    Product
    Refresco en lataDisponibles: 200
    $35.00
    Sneakers
    Running ShoesDisponibles: 50
    $60.00
    -50%$120.00
    tsx
                <ResourceList>
                  <ResourceListItem>
                    <ResourceListLeading>
                      <ResourceListThumbnail src="/colorful-gift-box.png" alt="Product" />
                    </ResourceListLeading>
                    <ResourceListContent headline="Refresco en lata" body="Disponibles: 200" />
                    <ResourceListTrailing label="$35.00" />
                  </ResourceListItem>
                  <ResourceListItem>
                    <ResourceListLeading>
                      <ResourceListThumbnail src="/sneakers-shoes-product.jpg" alt="Sneakers" />
                    </ResourceListLeading>
                    <ResourceListContent headline="Running Shoes" body="Disponibles: 50" />
                    <ResourceListPrice price="$60.00" originalPrice="$120.00" discount="-50%" />
                  </ResourceListItem>
                </ResourceList>

    With Checkbox

    Checkbox Items

    Agua
    AguaIlimitado · 0 variantes
    $10.00
    Refresco
    RefrescoIlimitado · 0 variantes
    $15.00
    tsx
    <ResourceList>
      <ResourceListItem onClick={() => toggleSelection(1)}>
        <ResourceListLeading>
          <Checkbox className={"m-4"} checked={selectedItems.includes(1)} />
          <ResourceListThumbnail src="/colorful-gift-box.png" alt="Agua" size="sm" />
        </ResourceListLeading>
        <ResourceListContent headline="Agua" body="Ilimitado · 0 variantes" />
        <ResourceListTrailing label="$10.00">
          <ResourceListChevron />
        </ResourceListTrailing>
      </ResourceListItem>
      <ResourceListItem onClick={() => toggleSelection(2)}>
        <ResourceListLeading>
          <Checkbox className={"m-4"} checked={selectedItems.includes(2)} />
          <ResourceListThumbnail src="/colorful-gift-box.png" alt="Refresco" size="sm" />
        </ResourceListLeading>
        <ResourceListContent headline="Refresco" body="Ilimitado · 0 variantes" />
        <ResourceListTrailing label="$15.00">
          <ResourceListChevron />
        </ResourceListTrailing>
      </ResourceListItem>
    </ResourceList>

    With Action Button

    Action Items

    Clip
    Clip Plus 234543
    Device
    Clip Pro78901
    tsx
    <ResourceList>
      <ResourceListItem>
        <ResourceListLeading>
          <ResourceListThumbnail src="/placeholder-logo.png" alt="Clip" size="sm" />
        </ResourceListLeading>
        <ResourceListContent headline="Clip Plus 2" body="34543" />
        <ResourceListTrailing>
          <ResourceListAction onClick={() => console.log('connect')}>
            Conectar
          </ResourceListAction>
        </ResourceListTrailing>
      </ResourceListItem>
    </ResourceList>

    Complete Example

    Showcasing various item configurations in a single list.

    Sandwich, Coffee &...Multiple payments
    $5,000.002 links
    Gustavo ColoradoBBVA --6480
    Product
    Refresco en lataDisponibles: 200
    $35.00
    Información personalInformación de tu cuenta
    BeneficiarioMaría Casanova
    Agua
    AguaIlimitado · 0 variantes
    $10.00
    Clip
    Clip Plus 234543
    Raspberry NY cheesec...Discount
    $60.00
    -50%$120.00

    Avatar

    Stable

    Avatars represent users, entities, or content. They can display images, text initials, or icons, with optional badges for status indicators or notifications.

    Import

    tsx
    import { Avatar } from "@/components/ui/avatar"

    Basic Usage

    tsx
    <Avatar>John Doe</Avatar>
    
    <Avatar src="/avatar.jpg" alt="User avatar" />
    
    <Avatar badge={5}>MT</Avatar>
    
    <Avatar size="lg" variant="accent">
      <User className="size-6" />
    </Avatar>

    Exports

    AvatarThe main avatar component
    avatarVariantsTailwind variants function for custom styling
    Interactive Playground
    MT
    Controls

    Featured Examples

    With Badge Number

    MT
    9
    tsx
    <Avatar badge={9}>MT</Avatar>

    With Image

    User
    tsx
    <Avatar src="/avatar.jpg" alt="User" badge />

    Sizes

    With Initials

    M
    MT
    MT

    With Icon

    With Image

    User
    User
    User

    Variants

    Default

    M
    MT
    User

    Accent

    M
    MT

    Badges

    With Badge Dot

    M
    MT
    MT

    With Badge Number

    M
    9
    MT
    9
    MT
    9

    Icon with Badge

    9

    Image with Badge

    User
    User
    User
    9

    Custom Badge Colors

    MT
    3
    5
    JD

    Combined Examples

    User Profile

    John

    John Doe

    Online

    tsx
    <div className="flex items-center gap-3">
      <Avatar size="lg" src="/user.jpg" alt="John" />
      <div>
        <p className="font-semibold">John Doe</p>
        <p className="text-sm text-muted">Online</p>
      </div>
    </div>

    Notification Badge

    JD
    12
    tsx
    <Avatar badge={12} variant="accent">
      JD
    </Avatar>

    Avatar Group

    AB
    CD
    EF
    tsx
    <div className="flex -space-x-2">
      <Avatar>AB</Avatar>
      <Avatar>CD</Avatar>
      <Avatar>EF</Avatar>
    </div>