A custom-styled select component with Indigo highlights and keyboard-accessible menu interaction.
The primary interactive surface that displays the current selection or placeholder.
Visual cue that suggests the menu can be expanded or collapsed.
The floating container that reveals the list of selectable options.
Individual items within the menu with clear hover and active states.
// ExperimentDropdown.tsx
const ExperimentDropdown = ({ options, selectedId, onChange }) => (
<div className="relative">
<button className="flex justify-between w-full p-3 border rounded-lg">
<span>{selected?.label || 'Select...'}</span>
<ChevronIcon />
</button>
<div className="absolute top-full mt-1 w-full bg-white shadow-xl rounded-xl border p-2">
{options.map(opt => (
<div className="p-2 hover:bg-indigo-50 rounded-md cursor-pointer">
{opt.label}
</div>
))}
</div>
</div>
);