Recording status button
Compact pill that replaces the red Start button after capture begins. Used in the system tray and any other small surface that needs the live recording status without the full footer.
States
| State | Story |
|---|---|
| Countdown 3s | recording-status-countdown-3 |
| Countdown 1s | recording-status-countdown-1 |
| Recording | recording-status-recording |
| Paused | recording-status-paused |
| Stopping | recording-status-stopping |
| Error | recording-status-error |
API
#![allow(unused)] fn main() { use ui_storybook::components::recorder::{ RecordingStatusButton, CompactRecordingState, }; view! { <RecordingStatusButton state=CompactRecordingState::Recording { elapsed_label: "00:42".into(), } shortcuts=vec!["⌘".into(), "⇧".into(), "2".into()] /> } }
elapsed_label and seconds_remaining come from the parent each
frame. The component has no set_interval, no Effect, no clock
of its own — which is what keeps it SSR-stable and deterministic in
snapshots. app-ui owns the timer that ticks both values.
Composition
stateDiagram-v2
[*] --> Countdown
Countdown --> Recording: countdown reaches 0
Recording --> Paused: pause
Paused --> Recording: resume
Recording --> Stopping: stop
Paused --> Stopping: stop
Stopping --> Stopped: encoder done
Recording --> Error: capture failure
Paused --> Error: capture failure