Modus UI

Hum Capsule

Web (React)

A dictation button that opens into a capsule with a live level meter and a running clock.

At rest it is a soft muted square in foreground ink; while listening it widens and its meter and timer take the primary token. Slide left to cancel, or hold to talk.

Modus / Hum Capsule

Installation

CLI

npx @modus-ui/cli add hum-capsule

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/hum-capsule.tsx.
  3. Paste the code.

Usage

tsx
import { HumCapsule } from "@/components/ui/hum-capsule";

export default function Example() {
  return <HumCapsule />;
}

Props

PropTypeDefaultDescription
accentColorstring"hsl(var(--primary))"-
iconColorstring"hsl(var(--foreground))"-
backgroundstring"hsl(var(--muted))"-
sizenumber28-
shapestring"rounded"-
reachnumber8-
showTimebooleantrue-
waveformbooleantrue-
slideToCancelbooleantrue-
cancelDistancenumber64-
attacknumber40-
releasenumber240-
sensitivitynumber1-
floornumber0.1-
openDurationnumber200-
pressScalenumber0.95-
modestring"auto"-
holdAfternumber300-
reactivestring"simulated"-
disabledbooleanfalse-
ariaLabelstring"Dictate"-
onStartany--
onStopany--

Comments

  • No comments yet.