# liquid-glass

> A headless React lens that bends live DOM, with copy modes that refract in Safari and Firefox, not only Chrome.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/liquid-glass

free

A headless React lens that bends live DOM, with copy modes that refract in Safari and Firefox, not only Chrome.

by Sam Asante[GitHub](https://github.com/samasante/liquid-glass)[npm](https://npmjs.com/package/@samasante/liquid-glass)

[visit](https://glass.samasante.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://glass.samasante.com](https://glass.samasante.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Glisse](https://tastebase.ehsanulsiam.workers.dev/browse/glisse)

A faithful web implementation of Apple's Liquid Glass: refracting buttons, switches, tab bars and menus.

no preview

### [Liquid Glass React](https://tastebase.ehsanulsiam.workers.dev/browse/liquid-glass-react)

A single <LiquidGlass> wrapper that adds refraction, chromatic aberration and elastic hover to any content.

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

no preview

### [Transitions.dev](https://tastebase.ehsanulsiam.workers.dev/browse/transitions-dev)

Copy-ready CSS transitions for modals, menus, panels, toasts and state swaps, via a CLI or agent skill.

## For your agent

##### Install

`npm i @samasante/liquid-glass`

##### Use it for

- refraction that must show on Safari and iOS, not fall back to a flat blur
- a lens over a photo that bends the image behind a notification
- a magnifier lens that follows the pointer over a hero while its text stays selectable
- lenses over a playing clip, one per control

##### Skip it when

- ready-made glass switches, tab bars and menus: use glisse, which ships the controls
- a glass look on many elements at once: each lens is an SVG filter, keep it to a few floating surfaces
- glass over flat white or text-heavy UI: there is nothing to refract and contrast drops; use solid surfaces

##### What's inside6 free

- Glass
- GlassSwitch (example)
- GlassSlider (example)
- GlassNotification (example)
- GlassContextMenu (example)
- GlassVideoControls (example)

##### Facts

**Frameworks**
react

**Styling**
unstyled

**Weight**
small

**Accessibility**
ok

**Maturity**
experimental

**License**
MIT

**Price**
Free

##### Pairs with

[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

##### Alternatives

[Glisse](https://tastebase.ehsanulsiam.workers.dev/browse/glisse)[Liquid Glass React](https://tastebase.ehsanulsiam.workers.dev/browse/liquid-glass-react)

[Compare liquid-glass with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/liquid-glass-alternatives)

```
import { Glass } from '@samasante/liquid-glass'

<Glass refract={<img src="/photo.jpg" alt="" />} behind="#222" width={420} height={84} radius={20}>
  <p className="px-5 py-4 text-white">Your order shipped</p>
</Glass>
```

https://glass.samasante.com

Loading website

[Visit](https://glass.samasante.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
