Command Palette Feature Showcase
A feature list styled as an interactive command palette: a search field filters a grouped list of features in real time as you type, each row showing an icon, title, description, and a decorative keyboard-shortcut hint, inspired by macOS Spotlight and VS Code's command palette.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/command-palette-feature-showcase.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature101.tsx instead.
Usage
The file also exports feature101Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Feature101, feature101Demo } from "@/components/blocks/feature/feature101"; export default function Page() { return <Feature101 {...feature101Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | undefined | Small label above the heading; omitted entirely when unset. |
| heading | ReactNode | none | Section heading. |
| description | string | undefined | Supporting copy under the heading. |
| groups | CommandPaletteGroup[] | none | Grouped feature items shown under a group label. |
| placeholder | string | "Search features..." | Placeholder text for the search input. |
| className | string | undefined | Extra classes for the outer section element. |
Types
type CommandPaletteItem = { icon: number; // index into a fixed built-in icon set title: string; description: string; shortcut?: string; }; type CommandPaletteGroup = { label: string; items: CommandPaletteItem[]; };
Behavior notes
- Real client-side state: the search input is a fully controlled useState<string>, and on every keystroke every group's items are filtered (case-insensitive substring match against title and description); groups with zero matching items are hidden entirely, and a "No features match" message shows when nothing matches at all.
- "use client" component, so its demo props live in the sibling feature101.demo.tsx file per this repo's client/demo-file-split rule, not in feature101.tsx itself.
- Each item's `icon` is a numeric index into a fixed, built-in array of lucide-react icons rather than accepting an icon component as data, consistent with this repo's rule against passing component references as props on a "use client" block.
- The keyboard-shortcut `<kbd>` hints and the "esc" hint next to the search field are decorative styling only; no keyboard shortcut handling or focus-trap is actually wired up.
- Hover states on each row are plain CSS (`hover:bg-muted`); there is no keyboard arrow-key navigation between results.
- The search field uses a real `<Label htmlFor>` (visually hidden via `sr-only`) tied to the input's id for screen reader users.
More Feature Blocks
View all →Full-Bleed Workspace Band
Two-column header above a full-bleed image band with a live view switcher, closing on three numbered captions.
Center-Line Journey Timeline
Vertical hairline timeline alternating stages either side, dropping a phone frame on one step.
Figure-Led Evidence Rows
Tall image with a floating before-and-after card, leading into oversized-figure evidence rows.
Staircase Asset Trio
Three image tiles stepping down the page in a staircase, each floating a different live asset.
Sticky Reference List
Sticky heading column beside three labelled groups of checked capabilities, closing on a footnote.
Day Timeline Rows
Hairline rows walking through one working day, stamped with time and a live approval card inline.