Rebar UI

1.0

opinion

TextToSpeechBar

A play, pause, stop and generate bar; the caller drives the speech and the bar shows its state.

Read aloudGenerate, play, pause, stop
Ready to generate audio.
Generating
Generating audio…
Playing
Playing
Paused
Paused

In context

Interview summaryListen to a write-up instead of reading it
Research
PNCrew interview 11Summary by Priya, 21 Oct

Shift swaps still run through the group chat. Three of the crew asked for a single place to see who is covering, and two said the quiet inbox would help on night watch.

Paused

Props

PropTypeRequiredDefault
stateTtsStateYes—
progressnumber | undefinedNo—
onGenerate() => voidYes—
onPlay() => voidYes—
onPause() => voidYes—
onStop() => voidYes—
errorMessagestring | undefinedNo—
voicesTtsVoiceOption[] | undefinedNo—
selectedVoiceIdstring | undefinedNo—
onVoiceChange((voiceId: string) => void) | undefinedNo—
speednumber | undefinedNo1
onSpeedChange((speed: number) => void) | undefinedNo—

Accessibility

The main button is always at least 44px and an aria-live region announces every state change. The component does no synthesis itself; the caller sets state.

data-rebar-* attributes

data-rebar-component="text-to-speech-bar", data-rebar-state; parts include main-button, stop-button, voice-select, speed-slider.

Migrating to Ant Design

Not codemod-covered. Compose AntD's Button, Progress, Select and Slider against the same state machine.