Search

Command search with live filtering and an empty state.

Installation

pnpm dlx shadcn@latest add @ward/search

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/search.json

Usage

import SearchList from "@/components/ward/SearchList";
<SearchList
  items={["Forecast summer demand", "Audit sugar costs", "Retire low sellers"]}
  labels={{
    placeholder: "Search tasks…",
    ariaLabel: "Search tasks",
    emptyTitle: "No results found",
    emptyHint: "Adjust your search to try again",
  }}
/>

Props

PropTypeDefaultDescription
variantstring"Default"Accepted for registry parity; the component has a single variant.
itemsSearchItem[]ITEMSStrings to search, with the first five shown while the field is empty.
labelsSearchListLabelsLABELSPlaceholder, accessible label and empty-state text for the search field.

Ward · Version 1.1.0 · Registry manifest