Knit UI
GitHub

Playground

Loading playground…

false
Playground
<TimeValue
  value="13:30:00"
  format="24h"
  withSeconds={false}
/>

Examples

Default

Default 24h formatting.

Loading example…

DefaultSourceStorybook

Twelve Hour

12h mode with AM/PM.

Loading example…

Twelve HourSourceStorybook

With Seconds

Seconds appended in both modes.

Loading example…

With SecondsSourceStorybook

Custom Am Pm Labels

Localized AM/PM labels.

Loading example…

Custom Am Pm LabelsSourceStorybook

From Date

A Date value reads its wall-clock time.

Loading example…

From DateSourceStorybook

Styled

Inherits Text styling / theme: as a real text node it accepts the kit's font props and recolors with the surrounding theme.

Loading example…

StyledSourceStorybook

Props

PropTypeDefaultDescription
value requiredstring | Date13:30:00Time to format — an "HH:mm:ss" string or a Date.
amPmLabelsTimePickerAmPmLabels | undefined{ am: 'AM', pm: 'PM' }AM/PM labels for the `12h` mode.
disabled systemboolean | undefinedSpecifies the disabled state of the text view for testing purposes.
formatTimePickerFormat | undefined
24h · 12h
'24h'Clock display mode.
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
theme systemThemeName | null | undefinedApplies a theme to this element
withSecondsboolean | undefinedfalseDisplay a seconds segment.
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 507 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.