Skip to content

Time picker

Choose a time with sensible keyboard behavior.

TimeField
npx shadcn@latest add @silicon-ui/time-picker

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/time-picker

Manually

  1. Install the dependencies

    npm install lucide-react motion
  2. Copy these files into your project

    • components/silicon-ui/time-picker/time-picker.tsx
    • components/silicon-ui/time-picker/time-picker.module.css

    Shared with other components. Skip any you already have.

    • components/silicon-ui/lib/fluid-hover.tsx
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { TimePicker } from "@/components/silicon-ui/time-picker/time-picker";

API reference

PropTypeDefault
label*string—
valuestring—
defaultValuestring"09:00"
onChange(value: string) => void—
descriptionstring—
placeholderstring"Select a time"
minuteStep1 | 5 | 10 | 15 | 30

15101530

15
format"12h" | "24h""12h"
disabledbooleanfalse
classNamestring—

Dependencies

npm
lucide-reactmotion
Registry
silicon-motion-tokens