
glass-ui
io.github.lemuayala/glass-ui
iOS-style glassmorphism components and GLASS.md specs for Tailwind and React Native.
Documentation
Glass UI
Glassmorphism playground for web and React Native.
Tune seven iOS-style primitives, preview on iPhone or iPad,
export Tailwind / NativeWind TSX, and copy GLASS.md for your editor or agent.
What you get
- Playground (
/play) — Card, Button, Input, Modal, Tab Bar, Switch, Nav Bar; blur, tint, radius, intensity, borders, padding, shadow. - Device preview — iPhone, iPad, or full-width; upload a wallpaper to check transparency.
- Presets — Frosted, Liquid Glass, Smoked, Crystal, Sunset, Aqua.
- Export — web inline or CVA component; native (
expo-blur<BlurView>or NativeWind) inline or typed file; GLASS.md with tokens, TSX, paths, and a short checklist. - CLI & npm — install components via
npx @lemuayala/glass-ui-core add cardor import@lemuayala/glass-ui-coredirectly. - shadcn registry — every primitive, preset and platform as a shadcn item:
npx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-card.json(index at/r/registry.json, everything at/r/glass-ui.json). - MCP Server — connect
@lemuayala/glass-ui-mcpto Claude Code, Cursor, or Antigravity (claude mcp add glass-ui -- npx -y @lemuayala/glass-ui-mcp). - Share URL — same design opens for anyone with the link.
- EN / ES — UI translated; component names stay in English in the nav.
CLI & MCP Quick Setup
# Drop a typed component directly into your Next.js, Vite, or Expo project
npx @lemuayala/glass-ui-core add card
npx @lemuayala/glass-ui-core add button --native --preset liquid --glass-md
# Or with the shadcn CLI (items: <component>[-<preset>][-native])
npx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-card.json
npx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-button-liquid.json
# Connect Glass UI MCP server to Claude Code
claude mcp add glass-ui -- npx -y @lemuayala/glass-ui-mcp
Components
| Primitive | Web | React Native |
|---|---|---|
| Card | ✅ | ✅ |
| Button | ✅ | ✅ |
| Input | ✅ | ✅ |
| Modal | ✅ | ✅ |
| Tab Bar | ✅ | ✅ |
| Switch | ✅ | ✅ |
| Nav Bar | ✅ | ✅ |
Core properties
| Property | Options |
|---|---|
theme | light · dark |
blur | none · sm · md · lg · xl |
rounded | none · md · lg · xl · 2xl · 3xl · full |
intensity | subtle · medium · strong |
border | none · subtle · strong |
padding | sm · md · lg |
shadow | none · sm · md · lg |
tint | none · blue · pink · orange · teal |
GLASS.md
Open the code panel in the playground and copy GLASS.md. It includes your current props, target project (framework, paths, Tailwind version, package manager), generated TSX, usage snippet, and integration steps — useful for Cursor, Claude, or Copilot without re-describing the design.
Export modes
| Mode | Web | Native |
|---|---|---|
| Inline snippet | Tailwind classes in JSX | expo-blur <BlurView> or NativeWind on View / Pressable |
| Reusable component | CVA + forwardRef | Typed CVA component + <BlurView> / NativeWind |
Quick start
Requires pnpm.
git clone https://github.com/lemuayala/glass-ui.git
cd glass-ui
pnpm install
pnpm dev
| URL | Route |
|---|---|
| localhost:3000 | Landing |
| localhost:3000/play | Playground |
Optional (see .env.example):
NEXT_PUBLIC_SITE_URL=https://your-domain.vercel.app
NEXT_PUBLIC_GITHUB_URL=https://github.com/lemuayala/glass-ui
pnpm icons:export # regenerate apple-icon PNGs from SVG
Scripts
| Command | Purpose |
|---|---|
pnpm dev | Dev server |
pnpm build | Production build |
pnpm lint | ESLint |
pnpm typecheck | TypeScript check |
pnpm test | Unit & integration tests (Vitest) |
pnpm test:coverage | Tests with V8 coverage thresholds |
pnpm test:e2e | Browser E2E suite (Playwright, desktop + mobile) |
Tech stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| UI | React 19 |
| Styling | Tailwind CSS v4 |
| Variants | CVA |
| Native | NativeWind-oriented templates |
| Theming | next-themes |
| Highlighting | prism-react-renderer |
| i18n | Custom dictionaries (lib/i18n/) |
Codegen: lib/glass-core/ · Contributor notes: AGENTS.md
Keyboard shortcuts
| Shortcut | Action |
|---|---|
1–7 | Switch component |
T | Component theme |
P | Presets |
S | Copy share link |
L | Language |
Shift+T | App theme |
? | Shortcuts |
Esc | Close dialogs |
Roadmap
- Switch & Nav Bar
- GLASS.md + project profile
- Landing +
/play, share URLs - Real native blur (
expo-blur<BlurView>) + NativeWind switch -
@lemuayala/glass-ui-corenpm package + CLI installer -
@lemuayala/glass-ui-mcpserver for coding agents - Post-publish smoke test against npm
- shadcn-compatible registry (
/r/*.json) - Figma plugin
- Embedded native preview (Expo Snack)
Deploy
Hosted on Vercel — preview on pull requests, production on main.
@lemuayala/glass-ui-mcpnpm install @lemuayala/glass-ui-mcp