Component libraryPrompt library
Prompt library
ProBrowse reusable prompts, fill in their variables and select a finished prompt.
npx shadcn@latest add @tidal-pro/prompt-libraryInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/prompt-library.css, components/ui/search-field.css, components/ui/textarea.css, components/ui/native-select.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Controlled prompt records, categories, search text, category filter, favorites, saved-only filter, selection and variable values. Unique known IDs and declared {{variable}} names are validated. Search matches titles and descriptions locally. Variables render as labelled Textarea fields; exact text substitution produces a read-only preview and required empty fields disable Use prompt. Optional empty values substitute an empty string. Native selection/favorite/use buttons preserve caller-first prevention and disabled state. Accepted Search input, Native select and Textarea supply controls; native section ref, translated labels, h2-h5 hierarchy, empty results, RTL and narrow stacking are supported. Removed or disabled owned focus recovers only from source/body to the persistent root. No model call, clipboard action, request, storage, persistence or execution occurs; onUse receives the selected record and exact rendered text. Use/select/favorite button props accept native React19 refs with cleanup; prop getters resolve once per visible prompt and the same result owns rendering, availability and callbacks. formatCount localizes the exact visible result count, including zero.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.