SuperAPI AI Directory

shadcn_ui-time-picker

Frontend & websites

View repository

Updated 10-16 04:00

About this skill

Shadcn UI — Time Picker

Instructions

ShadTimePicker is a time picker component. Optional trailing widget (e.g. icon). For forms use ShadTimePickerFormField with label, description, onChanged, and validator. Use ShadTimePickerFormField.period for AM/PM period selection.

Standalone

const ShadTimePicker(
  trailing: Padding(
    padding: EdgeInsets.only(left: 8, top: 14),
    child: Icon(LucideIcons.clock4),
  ),
)

Form field

ShadTimePickerFormField(
  label: const Text('Pick a time'),
  onChanged: print,
  description: const Text('The time of the day you want to pick'),
  validator: (v) => v == null ? 'A time is required' : null,
)

Period (AM/PM)

ShadTimePickerFormField.period(
  label: const Text('Pick a time'),
  onChanged: print,
  description: const Text('The time of the day you want to pick'),
  validator: (v) => v == null ? 'A time is required' : null,
)