HextaUI

Time input (UI SDK): Disabled

A disabled field is skipped by focus and doesn’t submit.

import { Label } from "@/components/ui/label"
import { TimeInput } from "@/components/ui/ui-sdk-time-input"

function UiSdkTimeInputDisabled() {
  return (
    <div className="flex w-full max-w-40 flex-col gap-2">
      <Label id="closed-time">Last entry</Label>
      <TimeInput aria-labelledby="closed-time" defaultValue="22:00" disabled />
    </div>
  )
}

export { UiSdkTimeInputDisabled }

This adds the example as components/examples/ui-sdk-time-input/disabled.tsx, together with the Time input component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/ui-sdk-time-input-disabled.json

To add only the component, follow the Time input installation.

Props in this example

The Time input props this example sets, from the API reference.

PropTypeDefault
defaultValue
string | null–
disabled
booleanfalse

Every prop is in the Time input API reference.

See them all, with keyboard support and accessibility notes, on the Time input page.