time-field

PreviousNext

time-field

Docs
intentuiui

Preview

Loading preview…
components/ui/time-field.tsx
"use client"

import {
  TimeField as TimeFieldPrimitive,
  type TimeFieldProps,
  type TimeValue,
} from "react-aria-components"
import { cx } from "@/lib/primitive"
import { fieldStyles } from "./field"

export function TimeField<T extends TimeValue>({ className, ...props }: TimeFieldProps<T>) {
  return (
    <TimeFieldPrimitive
      {...props}
      data-slot="control"
      className={cx(fieldStyles({ className: "w-fit" }), className)}
    />
  )
}

Installation

npx shadcn@latest add @intentui/time-field

Usage

import { TimeField } from "@/components/ui/time-field"
<TimeField />