Componentpickers0.84 KB gzipZero dependencies

Time Input

Curtain call showtime selector with hours, minutes, and AM/PM stepper.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add time-input

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { TimeInput } from "@/components/ui/time-input"; <TimeInput defaultValue="20:00" onValueChange={(t) => console.log(t)} />

Source code

time-input.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxtime-input.tsx122 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface TimeInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {  value?: string; // "19:30" or "07:30 PM"  defaultValue?: string;  onValueChange?: (val: string) => void;  format24h?: boolean;  className?: string;} export function TimeInput({  value: controlledValue,  defaultValue = "19:30",  onValueChange,  format24h = true,

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { TimeInput } from "@/components/ui/time-input"; <TimeInput />
PropTypeDescription
valuestringControlled value.
defaultValuestringInitial value when uncontrolled. (Default: "19:30")
onValueChange(val: string) => voidCallback invoked on value change.
format24hbooleanToggles format24h. (Default: true)
classNamestringOptional Tailwind or custom CSS classes merged with component styles.