Time
Components for displaying and composing media time information
Anatomy
<Time.Group>
<Time.Value type="current" />
<Time.Separator />
<Time.Value type="duration" />
</Time.Group><media-time-group>
<media-time type="current"></media-time>
<media-time-separator></media-time-separator>
<media-time type="duration"></media-time>
</media-time-group> <Time.Value /> reference
<media-time> reference
<Time.Value /> reference
<media-time> reference
Displays a formatted time value (current, duration, or remaining).
Props
| Prop | Type | Default | |
|---|---|---|---|
label | string | function | '' | |
| |||
negativeSign | string | '-' | |
| |||
type | 'current' | 'duration' | 'remaining' | 'current' | |
| |||
State
State is accessible via the
render, className, and style props.
State is reflected as data attributes for CSS styling.
| Property | Type | |
|---|---|---|
type | 'current' | 'duration' | 'remaining' | |
| ||
seconds | number | |
| ||
text | string | |
| ||
phrase | string | |
| ||
datetime | string | |
| ||
Data attributes
| Attribute | Description |
|---|---|
data-type | The type of time being displayed. |
<Time.Group /> reference
<media-time-group> reference
<Time.Group /> reference
<media-time-group> reference
Container for composed time displays. Renders a <span> element.
<Time.Separator /> reference
<media-time-separator> reference
<Time.Separator /> reference
<media-time-separator> reference
Divider between time values. Hidden from screen readers.