Skip to content

    Browse components

    Toggle Vault

    A lock switch styled as a vault door: the combination dial winds back, spins, and the bolts retract; locking spins it home and slams the bolts shut.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/toggle-vault

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/toggle-vault.json

    Usage

    import { ToggleVault } from "@/components/ui/toggle-vault";
    
    <ToggleVault locked={locked} onChange={setLocked} />

    Props

    PropTypeDefaultDescription
    sizenumber160Diameter in px.
    defaultLockedbooleantrueStart locked (uncontrolled).
    labelstring"Vault"Accessible name, announced as "<label> lock".
    openColorstring"#22c55e"Indicator color when unlocked.
    lockedColorstring"#ef4444"Indicator color when locked.
    lockedReactNode—Controlled state. Pair with onChange(locked).
    classNamestring—Extra classes for the root element.