Liquid Glass for the web: the rim refraction, light and motion of iOS 27 glass on any rounded element. React bindings and pill tabs. MIT.
| 1 | # @colineapp/liquid-glass |
| 2 | |
| 3 | > Liquid Glass for the web: the rim refraction, light and motion of iOS 27's glass on any rounded element, with React bindings, menus that pour out of their button, and segmented tabs whose thumb clears into a lens. MIT. |
| 4 | |
| 5 | Version 0.2.0. Install: `npm install @colineapp/liquid-glass` |
| 6 |
| 7 | ## Without React |
| 8 |
| 9 | createLiquidGlass inserts the glass as the element's first child. |
| 10 |
| 11 | ```ts |
| 12 | import { createLiquidGlass } from "@colineapp/liquid-glass"; |
| 13 | import "@colineapp/liquid-glass/styles.css"; |
| 14 |
| 15 | const glass = createLiquidGlass(document.querySelector(".toolbar")!, { |
| 16 | interactive: true, |
| 17 | }); |
| 18 |
| 19 | glass.update({ variant: "clear" }); |
| 20 | glass.destroy(); |
| 21 | ``` |
| 22 |