Skip to content

    Browse components

    Expandable Dock

    A compact pill of actions that springs open into a panel (search, quick actions, inbox, player), morphing its size and corners between states.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/expandable-dock

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/expandable-dock.json

    Usage

    import { ExpandableDock } from "@/components/ui/expandable-dock";
    
    <ExpandableDock
      items={[
        { id: "home", label: "Home", icon: <House /> },
        { id: "search", label: "Search", icon: <Search />, panel: <SearchPanel /> },
        { id: "inbox", label: "Inbox", icon: <Bell />, panel: <Inbox /> },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { id, label, icon, panel?, onClick? }. Items with a panel expand the dock.
    bouncenumber0.2Spring bounce of the morph.
    durationnumber0.5Morph duration in seconds.
    radiusnumber24Corner radius of the open panel in px.
    defaultOpenstring—Id of the item open at first render.
    onOpenChangeReactNode—Called with the open item id, or null when closed.
    classNamestring—Extra classes for the root element.