Skip to content

    Browse components

    Search Cell

    A command-style search field that widens on focus and unfolds grouped, ranked results with highlighted matches, a sliding selection and full keyboard navigation.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/search-cell

    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/search-cell.json

    Usage

    import { SearchCell } from "@/components/ui/search-cell";
    
    <SearchCell
      items={[
        { id: "dash", label: "Dashboard", group: "Pages", icon: <LayoutGrid /> },
        { id: "new", label: "New project", group: "Actions", shortcut: ["⌘", "N"] },
      ]}
      onSelect={(item) => router.push("/" + item.id)}
    />

    Props

    PropTypeDefaultDescription
    placeholderstring"Search or jump to…"Input placeholder, also its accessible name.
    maxResultsnumber7Max rows shown.
    expandbooleantrueGrow wider while open.
    emptyMessagestring"No results for"Prefix of the empty state, followed by the query.
    itemsReactNode—`{ id, label, description?, group?, icon?, keywords?, shortcut? }[]`.
    onSelectReactNode—`(item) => void`, on click or Enter.
    defaultOpenReactNode—Start open without taking focus. Default false.
    classNamestring—Extra classes for the root element.