Skip to content

Get started

Installation

Add components with the shadcn CLI, or copy the folder by hand.

Markdown

Requirements

  • React 19 (Next.js 15+, Vite, TanStack Start, React Router…)
  • Tailwind CSS v4
  • An @/ import alias pointing at your source folder (the shadcn default).

With the CLI

Every component page has its own command. This one installs all of them into components/liquid-glass/:

Installation

npx shadcn@latest add https://onemorethink.dev/r/liquid-glass.json
No dependencies

By hand

Copy src/components/liquid-glass/ from the repository into your project as components/liquid-glass/. Nothing else is needed: no npm package, no CSS file (the components inject the few rules they need).

app.tsx
import { GlassButton } from '@/components/liquid-glass'

export function Hero() {
  return <GlassButton material="tinted" className="bg-sky-500 text-white">Get started</GlassButton>
}

Dark mode

The glass reads its colours from your CSS (the nearest opaque background and the element's own colours), so it follows whatever theme system you use. Clear glass picks its text colour from the tone it ends up, so labels stay readable on light and dark backdrops alike.

Next.js

The files already start with "use client". Import them from server components as usual.