Duration input preview
Enter an exact numeric duration with consumer-defined units and bounds.
pro · Forms · composite
When to use
- Use it when a page needs enter an exact numeric duration with consumer-defined units and bounds.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than duration input.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/duration-inputImport components/ui/tidal.css, components/ui/duration-input.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/duration-input.css";
import{TidalDurationInput}from"./components/ui/duration-input";
export default()=><div className="tidal-scope"><TidalDurationInput label={"Demo"} onUnitChange={() => {}} onValueChange={() => {}} unit={"value"} units={[{value:"value",label:"Demo"}]} value={"value"}/></div>;API and props
TidalDurationInput.label (required)ReactNodeRequired label value accepted by this exported component.
TidalDurationInput.onUnitChange (required)(unit: string, event: ChangeEvent<HTMLSelectElement>) => voidCallback invoked when the unit change interaction is proposed.
TidalDurationInput.onValueChange (required)(value: string, event: DurationEvent) => voidCallback invoked when the value change interaction is proposed.
TidalDurationInput.unit (required)stringRequired unit value accepted by this exported component.
TidalDurationInput.units (required)ReadonlyArray<TidalDurationUnit>Required units value accepted by this exported component.
TidalDurationInput.value (required)stringRequired value value accepted by this exported component.
TidalDurationInput.decrementButtonPropsStepButtonProps | undefinedOptional decrement button props value accepted by this exported component.
TidalDurationInput.decrementButtonRefRef<HTMLButtonElement> | undefinedOptional decrement button ref value accepted by this exported component.
TidalDurationInput.descriptionReactNodeOptional description value accepted by this exported component.
TidalDurationInput.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalDurationInput.errorReactNodeOptional error value accepted by this exported component.
TidalDurationInput.incrementButtonPropsStepButtonProps | undefinedOptional increment button props value accepted by this exported component.
TidalDurationInput.incrementButtonRefRef<HTMLButtonElement> | undefinedOptional increment button ref value accepted by this exported component.
TidalDurationInput.labelsPartial<{ value: string; unit: string; decrement: string; increment: string; required: string; invalidConfiguration: string; }> | undefinedOptional labels value accepted by this exported component.
TidalDurationInput.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalDurationInput.unitSelectPropsUnitSelectProps | undefinedOptional unit select props value accepted by this exported component.
TidalDurationInput.unitSelectRefRef<HTMLSelectElement> | undefinedOptional unit select ref value accepted by this exported component.
TidalDurationInput.valueInputPropsValueInputProps | undefinedOptional value input props value accepted by this exported component.
TidalDurationInput.valueInputRefRef<HTMLInputElement> | undefinedOptional value input ref value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.