Skip to content

Glass Segmented Control

A glass segmented control with a lens that slides between options.

Plan
Free · MIT
Dependencies
React only
Props
11 (7 adjustable)

Free forever

MIT license, for personal and commercial projects. See installation

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
optionsstring[]"Day, Week, Month, Year"Text of the options.
valuestring""Selected option (controlled mode).
defaultValuestring""Initial option (uncontrolled mode).
onChange(value: string) => void""Called when another option is chosen.
labelstring"Options"Accessible label of the group.
zoomnumber1.22How much the lens magnifies what is underneath (1 = none).
blurnumber10Blur of the background on the rail, in px.
refractionnumber1Strength of the lens refraction (0 = light isn't bent).
stiffnessnumber320Stiffness of the lens spring: higher feels snappier.
autoplaynumber0Seconds between automatic changes (0 = off; stops on interaction).
scenebooleanfalseDraws an animated color scene behind it (to see it refract).

Installation

Install it

1Install the package

npm i furin-ui

2Import it

import { GlassSegmented } from "furin-ui";

Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.

Dependencies

React
18 or later
Other libraries
none
License
MIT

Each file ships its own CSS: there's nothing else to install.

Keep exploring

  • Accessible tabs whose selection is a blob of liquid: it stretches toward the new tab, thins at the neck and merges when it arrives.

    Navigation

  • A seamless infinite marquee: the cursor slows it down and nudges it with inertia, rows run in opposite directions, and keyboard focus pauses it.

    Navigation

  • A knurled metal knob you turn by dragging.

    Navigation