ClickorKeyboard shortcut Alt + L

Dragto resize

Nord Design System SearchDeveloperDeveloperGetting startedUsing Web ComponentsWebfontsCDNLocalizationCSS Framework Legacy ESLint PluginWorking with AIFAQDesignDesignGetting startedFoundationsThemesBrand assetsToolsComponentsComponentsAccordion New Aside New Autocomplete New AvatarBadgeBanner Updated ButtonButton GroupCalendar Updated CardCheckbox Updated Collapsible New Combobox New Command MenuDate Picker Updated Date Range Picker New DividerDrawerDropdownEmpty StateField New FieldsetFilter Bar New FooterHeaderIconInput Updated Item New Kbd New LayoutMessageMeter New ModalNavigationNotificationNumber Field New Otp Field New Outline New Pagination New Performance FixturePopout Updated ProgressProgress BarQrcodeRadio Updated Range Updated Scroll Area New Segmented ControlSelect Updated SkeletonSpinnerStackTabTableTagTextarea Updated Time Picker New ToastToggle Updated TooltipTop BarTruncate New Visually HiddenDesign TokensDesign TokensTailwind CSSTailwind CSSBlocksBlocksTemplatesTemplatesIconsIconsPlaygroundPlaygroundLatest UpdatesLatest UpdatesChangelogChangelogMigration guidesMigration guides
GitHub

Clickto expandKeyboard shortcut Alt + L

TimePicker New Alpha

Open in Storybook

A native time field paired with a dropdown of selectable times at a configurable interval.

This component is considered alpha. We're still finalising the API, so it may include a breaking change at any time — use it at your own risk.
Loading...

Usage

Time Picker pairs the browser's native time field with a dropdown of quick options. People can type a time directly — the native field handles locale-aware display and validation — or pick a common time from the list, which is generated at a configurable interval between start and end.

The value is held in ISO HH:mm format, regardless of how the field is displayed for the user's locale.

The time picker renders its built-in label, hint and error on its own. Wrapped in a Field, the Field takes over with a Field Label, Field Description and Field Error, and the built-in versions step aside automatically.

import "@nordhealth/components/lib/TimePicker"
import "@nordhealth/components/lib/Field"
import "@nordhealth/components/lib/FieldLabel"
import "@nordhealth/components/lib/FieldDescription"
import "@nordhealth/components/lib/FieldError"

Standalone or inside a Field

Use the control on its own with its built-in label, hint and error, or wrap it in a Field — the Field then provides the labelling. Both render the same control:

InlineWith Field

Examples

Interval

Use start, end and interval to control the generated options. The default is every 30 minutes between 09:00 and 17:00.

Sizes

Use the size attribute to match the surrounding form.

Error

Show validation with a Field Error and mark the Field invalid.

Disabled

Read-only

Add readonly to show the committed value with a normal field appearance — unlike disabled it isn't dimmed, but the value can't be changed.

Accessibility

  • The field is the browser's native time input, so typing, keyboard editing of the hour/minute segments, and validation work as users expect.
  • The dropdown is an additional shortcut; the time can always be entered without it.
  • Always wrap the picker in a Field with a Field Label so its purpose is announced to assistive technology. When used without a Field, set an aria-label on the picker.

API reference

TimePicker

Time Picker pairs the browser's native time field with a dropdown of quick options, generated at a configurable interval between start and end. The native field handles typing, locale-aware display and validation; the dropdown is a shortcut for common times. The value is held in ISO HH:mm format. Like a native input, Time Picker is a control only — it has no built-in label, hint or error. Compose it inside a Field (with a Field Label, Field Description and Field Error) to label it and add help or error text.

<nord-accordion></nord-accordion>

Props

PropertyAttribute Description TypeDefault
valuevalueThe selected time, in ISO HH:mm format.string | undefined
namenameName submitted with the form.string | undefined
startstartEarliest time offered in the dropdown, ISO HH:mm.string'09:00'
endendLatest time offered in the dropdown, ISO HH:mm.string'17:00'
intervalintervalMinutes between each option in the dropdown.number30
roundToIntervalround-to-intervalWhen set, a typed time is rounded to the nearest interval option; otherwise any time is accepted.booleanfalse
hourFormathour-formatDisplay dropdown times in 12-hour (AM/PM) or 24-hour format; omit to use the locale default.'12h' | '24h' | undefined
minminEarliest time the field will accept, ISO HH:mm.string | undefined
maxmaxLatest time the field will accept, ISO HH:mm.string | undefined
sizesizeSize of the field.'s' | 'm' | 'l''m'
expandexpandWhether the field expands to fill its container.booleanfalse
disableddisabledWhether the field is disabled.booleanfalse
readonlyreadonlyWhether the field is read-only.booleanfalse
requiredrequiredWhether a value is required when submitting a form.booleanfalse
labellabelLabel for the control. Rendered by the inner input when used standalone; ignored when wrapped in a <nord-field> (the Field provides the label).string | undefined
hinthintOptional hint text. Ignored inside a <nord-field>.string | undefined
errorerrorOptional error text. Ignored inside a <nord-field>.string | undefined
hideLabelhide-labelVisually hide the label, but keep it for assistive technology.booleanfalse
hintBelowhint-belowRender the hint below the control instead of below the label.booleanfalse
hideRequiredhide-requiredVisually hide the required indicator, but keep the required state for AT.booleanfalse

Methods

Method nameParameters Description
focus() => voidN/AMove focus to the field, so a Field Label's click-to-focus works.
EventDetail TypeDescription
changeNordEventFired when the selected time changes.