WRNexus UI
Forms component

Time Picker

Theme-aware, responsive time picker component.

26 props0 slots7 outputsTheme readyResponsive
Interactive playground

Configure Time Picker

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<TimePicker
  label="Time Picker"
  value="09:30"
  placeholder="Enter a sample value"
  hours='[
    "00",
    "01",
    "02",
    "03",
    "04",
    "05",
    "06",
    "07",
    "08",
    "09",
    "10",
    "11",
    "12",
    "13",
    "14",
    "15",
    "16",
    "17",
    "18",
    "19",
    "20",
    "21",
    "22",
    "23"
  ]'
  minutes='[
    "00",
    "05",
    "10",
    "15",
    "20",
    "25",
    "30",
    "35",
    "40",
    "45",
    "50",
    "55"
  ]'
/>
Event outputInteract with the preview to inspect the typed payload.
Component props26 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Time picker

Choose an hour and minute in an anchored panel.

01
Live preview
Component usage.wrn
<TimePicker
  name="meeting-time"
  label="Meeting time"
  value="09:30"
  placeholder="Enter a sample value"
  hours='[
    "00",
    "01",
    "02",
    "03",
    "04",
    "05",
    "06",
    "07",
    "08",
    "09",
    "10",
    "11",
    "12",
    "13",
    "14",
    "15",
    "16",
    "17",
    "18",
    "19",
    "20",
    "21",
    "22",
    "23"
  ]'
  minutes='[
    "00",
    "05",
    "10",
    "15",
    "20",
    "25",
    "30",
    "35",
    "40",
    "45",
    "50",
    "55"
  ]'
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
@openFires after the component opens.
@closeFires after the component closes.
@invalidFires when the component emits the invalid event.
Declarative handlers.wrn
<TimePicker
  @input='console.log(payload)'
  @change='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
  @open='console.log(payload)'
  @close='console.log(payload)'
  @invalid='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"TimePicker\"], [data-component=\"TimePicker\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})

if (component) registerOutputHandler(component, "open", (payload) => {
  console.log("open", payload)
})

if (component) registerOutputHandler(component, "close", (payload) => {
  console.log("close", payload)
})

if (component) registerOutputHandler(component, "invalid", (payload) => {
  console.log("invalid", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
idstring""No
namestring""No
labelstring"Time"No
hiddenLabelbooleanfalseNo
valuestring""No
placeholderstring""No
variantstring"normal"No
iconstring"icon-[lucide--clock-3]"No
iconPositionstring"end"No
helperTextstring""No
cornerHintstring""No
errorstring""No
inlinebooleanfalseNo
minstring""No
maxstring""No
stepstring""No
formatstring"24"No
minuteStepnumber5No
hoursstring["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"]No
minutesstring["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"]No
readonlybooleanfalseNo
disabledbooleanfalseNo
requiredbooleanfalseNo
classstring""No