s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Projects · Components

DurationDisplay

Props for DurationDisplay component

Public export

typescript
import { DurationDisplay } from '@happyvertical/smrt-projects/svelte';
Import path
@happyvertical/smrt-projects/svelte
Props
4
Props described
4 of 4
Bindable state
0
Callback events
0
Verified release
0.44.0

Props

NameTypeRequiredDescription
hoursnumberYesDuration in hours to display.
format'decimal' | 'hhmm'NoFormat duration as decimal (8.5) or hours:minutes (8:30).
size'sm' | 'md' | 'lg'NoSets the font size of the duration display.
showLabelbooleanNoRenders the `h` unit after a `decimal` value; set `false` for a bare number, such as in a column whose header already names the unit. An `hhmm` value spells its own unit in the `8:30` shape and never appends a separate one, so this prop does not affect that format.

Bindable state

This component has no bindable public state.

Callback events

This component declares no callback event props.

Examples and explanation