HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Time Field

PreviousNext

A time typed in parts, with the hour, minute, second and AM or PM each stepped by keyboard.

Base UIReact AriaRadix UI
Radix UI
2:45PM

12 hour clock. Type digits, or use the arrow keys.

07:30:00

24 hour clock with seconds.

9:00AM
5:30PM

Open 09:00 to 17:30, in steps of 15 minutes.

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/time-field.json

Usage#

import { TimeField } from "@/components/ui/time-field"
<TimeField value={time} onValueChange={setTime} />
<TimeField hourCycle={24} granularity="second" />
<TimeField minuteStep={15} min="09:00" max="17:00" />

Keyboard#

  • Digits. Type to fill the focused part. Once a part can take no more digits, focus moves to the next one.
  • Up and Down. Step the focused part. Minutes move by minuteStep, and every part wraps around.
  • A and P. Set AM or PM on a 12 hour clock.
  • Left and Right. Move between parts.
  • Backspace. Clear the part, or move back when it is already empty.

Value#

The value is always a 24 hour string, "HH:mm", or "HH:mm:ss" with granularity="second", whatever hourCycle shows. It is an empty string until every part is filled. Outside min or max the field shows as invalid. Pass name to send the value with a form.

TextareaTimeline

On This Page

InstallationUsageKeyboardValue