Skip to content

hd-progress

Live preview

<hd-progress position="{{ cap.speaker_position }}" duration="{{ cap.speaker_duration }}" at="{{ cap.speaker_position.lastUpdated }}"{% if cap.speaker_playing.value %} playing{% endif %}></hd-progress>

Attributes and example

hd-progress

How far a track is: a thin bar with the time played and the time left, counting on every second while it plays (players report their position only now and then). Parts: ::part(bar), ::part(times).

AttributeWhat it is
positionrequiredSeconds played when it was last reported. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
durationrequiredLength in seconds. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}.
atWhen the position was reported (ISO), to count on from.
playingPlaying: count on by itself.Default false.
<hd-progress position="{{ cap.speaker_position }}" duration="{{ cap.speaker_duration }}" at="{{ cap.speaker_position.lastUpdated }}"{% if cap.speaker_playing.value %} playing{% endif %}></hd-progress>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

--hd-font-mono
The monospaced font of small labels.
--hd-text
Text and big numbers.
--hd-text-2xs
CSS input read by hd-progress.
--hd-text-faint
The quietest text: hints, units, times.
--hd-track
The empty part of a slider, bar or ring.

Exposed parts

hd-progress::part(bar) {  /* Your styles */}hd-progress::part(times) {  /* Your styles */}

Style the host

hd-progress {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables