Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Voice Auth Login Block for React

A smart-speaker app's sign-in page that asks you to say three words: press Start speaking and the passphrase lights up word by word over a waveform, with no microphone opened.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Ask for a spoken passphrase without listening to anyone, with this voice login block for React with Base UI. It's the sign-in page of Vocalane, a smart-speaker app: the page's rails run the full height of the screen and one band crosses it, and in the band a centred column shows the passphrase, amber, ladder, quiet, as three large words with a row of waveform bars under them. Pressing the Shine Button, Start speaking, runs a 2.7 second take: the words light up one after another, as a karaoke line does, while the bars rise and fall on every beat; Stop ends it early. At the end the result replaces the column's body in the same space and takes focus. Nothing is heard, recorded or matched, and the header says the microphone is never opened. It's built from Button, Shine Button and Guides, with a CSS entrance and CSS transitions only. For smart speakers, car and home apps, and any sign-in that offers a spoken phrase.

FAQ

Does this listen to me?

No. The page never calls getUserMedia or records audio: the take is 18 timers of 150 ms, the lit word follows the beat, and the bars take their heights from a fixed curve of the bar and the beat, never from sound. The result says that nothing was heard. In a product you would open the microphone only after Start, stream the audio to a speaker-verification service, and show its level in the bars.

How does the take work?

Each of the three words stays lit for six beats, 900 ms, and the beat that follows the last one ends the take. A word that is said stays in the text colour, the one that is lit is inverted, and the ones to come are muted, so the state never relies on a hue. Stop clears the timer, resets the words and the bars and returns focus to the start button, which then reads Try again.

What changes with reduced motion?

The bars hold one fixed shape while the take runs instead of changing every beat, and their transitions are switched off. The words still light up in turn, because that is how the take shows its progress, and the entrance on load is switched off.

Is a spoken passphrase safe to rely on?

Not on its own. A recording or a synthetic voice can fool a speaker check, so use a voice as a convenience beside something else, such as a device that is already trusted or a password. Keep the passphrase out of the page's text when the account holder should be the only one to know it; here it is shown because the demo needs a visible answer.

What about people who can't speak?

Voice can't be the only way in. The link under the button goes to a password form (point it at your own route), and the status line says in words when the take starts and ends, so a screen reader user isn't left guessing while the words light up.

  • Pro

    Biometric Auth Login

    Biometrics and keys

    A health app's sign-in page built around a press-and-hold fingerprint pad: hold it for two seconds to match, let go early and it says so, or press Scan if you cannot hold.

  • Pro

    Facial Recognition Login

    Biometrics and keys

    An office check-in page with a drawn viewfinder over four prompts (look straight, turn left, turn right, blink): press Start and each prompt runs for 800 ms, with no camera opened.

  • Pro

    Passkey Login

    Passwordless

    An online bank's sign-in page and its passkey chooser shown open over a drawn sign-in screen: two passkeys as radio rows, Cancel and Continue, a verifying step and a signed-in result, with the real dialog behind the Use your passkey button.

  • Pro

    PIN Entry Login

    Biometrics and keys

    A wallet app's unlock page: four dots over a keypad of three by four keys on hairline cells, typed digits and Enter, tries counted down and a lock after the third miss.

  • Pro

    Hardware Key Login

    Biometrics and keys

    A custody service's security-key page: a USB or NFC switch, three sign-in states, one button that waits for the key and then accepts it, and a drawing of a key and a port or a reader.

  • Pro

    Pattern Lock Login

    Biometrics and keys

    A private gallery's unlock page with a three by three grid of dots: drag across them with a pointer or use the arrow keys, Space and the digits 1 to 9, then Unlock; three tries before it locks.