Lens Tabs

A segmented control whose selection slides across as a magnifying lens. Tune it in your palette and copy plain CSS or the React version.

When to use Lens Tabs

Use it to switch between a few views, such as day, week and month.

Built with Liquid Glass UI by Bilal Gürsen (MIT). Copy it as plain CSS, or install the library for the React version.

More liquid glass styles

  • Clear Glass Button: A see-through button that bends the page behind it and swells under the pointer.
  • Tinted Glass Button: Coloured glass in your accent colour, with a lit rim and a soft shadow.
  • Droplet Action Button: The arrow floats beside the button as a droplet, then melts into it while the action runs.
  • Glass Button Group: Several actions share one body of glass that swells as a whole.
  • Slide to Confirm: Drag the glass thumb to the end to confirm. Let go early and it springs back.
  • Flowing Badge: A small glass drop with its label flowing through it on a loop.
  • Frosted Glass Card: A frosted card that keeps text readable while its rim bends what lies behind.
  • Clear Lens Card: Nearly invisible glass: no frost, just a bent, lit rim and a slight magnification.
  • Prism Glass: Strong bending with colour fringes at the rim, like light through a cut crystal.
  • Smoked Glass: Dark tinted glass with light frost, for white text over bright backdrops.
  • Colour Frost: Frosted glass tinted with a colour from your palette.
  • Thick Bevel Glass: A deep, bright rim that makes the card look like a thick slab of glass.
  • Magnifier Lens: A round lens that enlarges whatever sits beneath it.

Frequently Asked Questions

Do I need to install anything to use these?

No. Every style has CSS and HTML tabs with plain code you can paste into any site. You only need to install something if you want the React version with real light bending.

What is the difference between the CSS version and the React version?

The CSS version gives you the tint, frost, rim line, highlights and shadow using backdrop-filter (the CSS rule that blurs what is behind an element). The React version adds what CSS cannot do on its own: bending the page behind the glass, a colour fringe at the edge, magnifying, and the glass swelling under the pointer.