Checkbox

A control that allows the user to toggle between checked and not checked. Plays a toggle sound.

A control that allows the user to toggle between checked and not checked. The sensory-ui Checkbox plays a toggle sound on state change, confirming the binary state transition.

Pattern: Single-sound

Demo

Live demoSwitch sound packs to compare

Installation

npx shadcn@latest add SatyamVyas04/sensory-ui/sensory-ui-checkbox

Import

import { Checkbox } from "@/components/ui/sensory-ui/checkbox";

Sound Props

PropTypeDefaultDescription
soundSoundRole | false"interaction.toggle"Sound played on toggle.
volumenumber1Per-component volume multiplier (0–1).

Default Sound Role

interaction.toggle

Usage

<div className="flex items-center space-x-2">
  <Checkbox id="terms" />
  <label htmlFor="terms">Accept terms</label>
</div>

Custom sounds

<Checkbox sound="interaction.confirm" volume={0.7} />

Disable sounds

<Checkbox sound={false} />

Customizations

Terms acceptance

<Checkbox id="terms" sound="interaction.confirm" />
{/* More rewarding sound for important agreements */}

Filter options

<Checkbox id="filter-1" sound="interaction.toggle" volume={0.5} />
{/* Subtle sound for frequent filter toggling */}

Task completion

<Checkbox id="task-1" sound="interaction.confirm" />
{/* Satisfying confirmation when completing a task */}

Default Props

PropValue
sound"interaction.toggle"
volume1

Tasteful Sound Choices

SituationRecommended SoundWhy
Terms / agreementsinteraction.confirmMore significant toggle
Filter optionsinteraction.toggleStandard state change
Task completioninteraction.confirmRewarding completion
Settings toggleinteraction.toggleStandard toggle
Bulk selectioninteraction.subtleLighter for repeated use

When to Use

  • Form inputs: Terms, newsletter signup, agreements
  • Filters: Category, tag, or option filters
  • Task lists: Todo items, checklist completion
  • Settings: Binary option toggles
  • Selection lists: Multi-select options

Avoid sound on

  • Checkboxes that auto-save on toggle (sound may feel redundant)
  • Checkboxes inside modals that already play open/close sounds

Event Triggers

EventDefault Sound
Toggle checked/uncheckedinteraction.toggle

shadcn/ui Reference

View the original Checkbox documentation.