SpringSelect

A select dropdown whose menu follows the trigger with a tiny spring. The chevron rotates a hair past 180° before settling, and the panel slides down with a subtle overshoot.

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/spring-select

API Reference

PropTypeDefaultDescription
optionsSpringSelectOption[][]Array of options with value, label, optional description, and disabled
valuestringundefinedControlled value
defaultValuestringundefinedInitial value (uncontrolled)
placeholderstring'Select…'Placeholder text when no value is selected
onChange(value: string) => voidundefinedCalled when a new value is selected
labelstringundefinedVisible label rendered above the trigger
disabledbooleanfalsePrevents interaction
errorstringundefinedError message; presence triggers danger styling