Skip to content

Glow select

Dropdown select with a floating label that springs on selection and a cursor-mapped pastel border glow. Dropdown springs in with opacity and translateY. Chevron rotates with spring physics.

  • Spring Physics
  • requestAnimationFrame
  • pastelColour

glow-select

Country
Plan
Status

Click to open. Move your cursor around.

Usage

Drop it in

import
import { GlowSelect } from "@/app/lib/components/glow-select";
example 1
<GlowSelect
  label="Country"
  options={[{ value: "uk", label: "United Kingdom" }]}
  value={country}
  onChange={setCountry}
/>

API

Props

PropTypeDefault
options*

Available options

GlowSelectOption[]—
value*

Controlled value

string—
onChange*

Change handler

(value: string) => void—
label

Floating label text

string"Label"
placeholder

Placeholder when no value is selected

string"Select…"
disabled

Disables the select and suppresses all glow and spring motion

booleanfalse
className

Additional class names applied to the outermost wrapper div

string""

Read from the component's source at build time. * required.

Accessibility

Works with

Cursor
Reacts to where the pointer is, not just whether it's over the element.
Touch
Follows your finger while it's down, then settles a moment after you lift.
Keyboard
Focus lights it up the way the cursor does. Every action has a key.
Reduced motion
Nothing moves or springs. Colour still answers, without drifting.