Rating input preview
Collect a bounded rating through native radios with exact form values.
pro · Forms · primitive
When to use
- Use it when a product interface needs collect a bounded rating through native radios with exact form values.
- 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 rating input.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/rating-inputImport components/ui/tidal.css, components/ui/rating-input.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/rating-input.css";
import{TidalRatingInput}from"./components/ui/rating-input";
export default()=><div className="tidal-scope"><TidalRatingInput label={"Demo"} name={"Demo"} onValueChange={() => {}} value={1}/></div>;API and props
TidalRatingInput.label (required)ReactNodeRequired label value accepted by this exported component.
TidalRatingInput.name (required)stringRequired name value accepted by this exported component.
TidalRatingInput.onValueChange (required)(value: number | null, event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLButtonElement>) => voidCallback invoked when the value change interaction is proposed.
TidalRatingInput.value (required)number | nullRequired value value accepted by this exported component.
TidalRatingInput.clearButtonPropsOmit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "children" | "dangerouslySetInnerHTML"> | undefinedOptional clear button props value accepted by this exported component.
TidalRatingInput.clearButtonRefRef<HTMLButtonElement> | undefinedOptional clear button ref value accepted by this exported component.
TidalRatingInput.clearLabelstring | undefinedOptional clear label value accepted by this exported component.
TidalRatingInput.descriptionReactNodeOptional description value accepted by this exported component.
TidalRatingInput.errorReactNodeOptional error value accepted by this exported component.
TidalRatingInput.formstring | undefinedOptional form value accepted by this exported component.
TidalRatingInput.invalidLabelReactNodeOptional invalid label value accepted by this exported component.
TidalRatingInput.optionsReadonlyArray<TidalRatingOption> | undefinedOptional options value accepted by this exported component.
TidalRatingInput.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalRatingInput.requiredboolean | undefinedOptional required value accepted by this exported component.
TidalRatingInput.showClearboolean | undefinedOptional show clear value accepted by this exported component.
TidalRatingInput.unratedLabelstring | undefinedOptional unrated label value accepted by this exported component.
TidalRatingInput.valueLabel((value: number) => ReactNode) | undefinedOptional value label value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.