Component libraryDuration input

Duration input

Pro

Enter an exact numeric duration with consumer-defined units and bounds.

npx shadcn@latest add @tidal-pro/duration-input
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/duration-input

Import components/ui/tidal.css, components/ui/duration-input.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

label, controlled exact decimal string value, controlled unit string, consumer-owned units with unique nonblank values and exact string labels, and value/unit callbacks are required. Each unit may supply exact string min/max/step bounds or step any; every definition is checked before controls render, and a disabled unit cannot be the current selection. The component does not convert values when units change. Native number editing and 44px decrement/increment actions propose exact step changes within the selected bounds. Optional description/error, disabled/readOnly, root attributes/ref, native number/select props and refs, and decrement/increment button props and refs are supported. Read-only unit values retain native form serialization through a hidden mirror; disabled values remain natively omitted. Native handlers run first and prevention in either input event stops the single proposal. Consumers own form submission, validation policy, conversion, persistence and outcomes. No date, clock, schedule, request, network or storage behavior is bundled.

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.

Building with an agent?Give it the installation guide and component catalog.