Round controls for voice and call surfaces, with a live level meter while listening.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/voice-controlPlayground
Controls
Disabled
Bar: press the mic
Bar: listening
Bar: muted
Control
Icons animation
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/voice-control
Controls
Eight round controls for voice and call surfaces. Each has its own default label.
Motion
Accessibility
- Native buttons with a label for each control.
- Muted and captions use aria-pressed.
- The bar announces its status.
Motion
- Listening pulses a soft halo in a 1200 ms loop.
- Idle level bars loop while listening, and stop with animated off or reduced motion.
- Pass levels and the bars hold those heights in place of the loop.
- Bars stop when the control is disabled and pause offscreen.
- Mute stops the wave at once.
- With reduced motion, the halo holds still and the bars keep moving.
- Swift uses an SF Symbol for the level meter.
Responsive behavior
- 40 px on Web and 52 px on Mobile.
- VoiceBar drops its wave on narrow screens and wraps its controls.
Performance
- Level bars and the halo are CSS animations on transforms. They pause when scrolled out of view, through one shared observer.
- With levels, bars follow your values and the CSS loop is off.
- VoiceBar renders once a second for its call clock while not idle. The bar and wave loops run in CSS, without React renders.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import VoiceControl and VoiceBar from @/components/fetaui/voice-control.
- Use VoiceControl alone for custom layouts, and pass levels with five bar heights in px for a real meter.
- VoiceBar does not take levels, and its bars and wave are a loop. It records nothing.
- VoiceBar's second line shows
agent(default Assistant) while idle, then the time since the first tap. Pass meta to show your own text. - Captions state stays inside VoiceBar with no callback. Use VoiceControl to wire captions up.
Related
Icon ButtonComponentThe round sibling of Button, for an action one icon can explain.ToggleComponentA button that stays pressed.Status IslandComponentA floating pill that reports background work. It stacks what is waiting and opens into a tray of every task.ToolbarComponentA floating tool dock for canvas apps. It holds the current tool on an ink plate and redocks to any edge.ButtonComponentOne family for every action, with a label, optional icons and a shortcut key.