Component libraryInput group
Input group
ProPrefixes, suffixes, units and actions for a labelled native input.
npx shadcn@latest add @tidal-pro/input-groupInstallation
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/input-group.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
Extends native input attributes except component-owned children, disabled/readOnly and their ARIA mirrors; the forwarded ref targets the native input. Required label plus optional description/error ReactNode values receive linked IDs without dropping numeric zero. Optional prefix, suffix and unit ReactNode slots support accessible labels; units are always included in aria-describedby. Typed actions require stable actionId keys, default to native type=button, accept start/end placement, preserve native button attributes/DOM id/refs and explicit aria-disabled=false, and normalize aria-disabled=true into actual disabled behavior. Component disabled disables the input and every action; readOnly keeps the native input read-only while leaving consumer-owned actions available. Optional rootProps/rootClassName compose native div attributes. Consumers own values, validation, form submission, action behavior, requests, storage and focus after accepted actions.
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.