Select

Displays a list of options for the user to pick from. Plays open and close sounds.

Displays a list of options for the user to pick from, triggered by a button. The sensory-ui Select plays sounds when the dropdown opens and closes, confirming the selection interaction.

Pattern: Open / close

Demo

Live demoSwitch sound packs to compare

Installation

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

Import

import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectLabel,
  SelectScrollDownButton,
  SelectScrollUpButton,
  SelectSeparator,
  SelectTrigger,
  SelectValue,
} from "@/components/ui/sensory-ui/select";

Sound Props

PropTypeDefaultDescription
soundSoundRole | false"overlay.open"Sound played when the dropdown opens.
closeSoundSoundRole | false"overlay.close"Sound played when the dropdown closes.
volumenumber1Per-component volume multiplier (0–1).

Default Sound Role

overlay.open on open, overlay.close on close.

Usage

<Select>
  <SelectTrigger>
    <SelectValue placeholder="Select a fruit" />
  </SelectTrigger>
  <SelectContent>
    <SelectGroup>
      <SelectLabel>Fruits</SelectLabel>
      <SelectItem value="apple">Apple</SelectItem>
      <SelectItem value="banana">Banana</SelectItem>
    </SelectGroup>
  </SelectContent>
</Select>

Custom sounds

<Select sound="interaction.tap" closeSound="interaction.subtle">
  {/* ... */}
</Select>

Disable sounds

<Select sound={false} closeSound={false}>
  {/* ... */}
</Select>

Customizations

Country selector

<Select sound="overlay.open" closeSound="overlay.close">
  <SelectTrigger>
    <SelectValue placeholder="Select country" />
  </SelectTrigger>
  <SelectContent>
    {/* Country list */}
  </SelectContent>
</Select>

Compact form select

<Select sound="interaction.tap" closeSound="interaction.subtle" volume={0.5}>
  {/* Lighter for compact forms */}
</Select>

Default Props

PropValue
sound"overlay.open"
closeSound"overlay.close"
volume1

Tasteful Sound Choices

SituationRecommended SoundWhy
Form selectoverlay.open / overlay.closeDefault: dropdown cue
Country/timezoneoverlay.open / overlay.closeConsistent overlay
Compact formsinteraction.tap / interaction.subtleLighter utility
Silent formsfalseFor form-heavy pages

When to Use

  • Forms: Any single-select dropdown
  • Settings: Option selection (language, theme)
  • Filters: Category, status, or type filters
  • Country/timezone: Long list selections

Avoid sound on

  • Selects that auto-submit on change (sound may feel redundant)
  • Selects with very few options (consider Radio Group)

Event Triggers

EventDefault Sound
Dropdown opensoverlay.open
Dropdown closesoverlay.close

shadcn/ui Reference

View the original Select documentation.