glass-ui
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 27 GitHub stars
Code Warn
- process.env — Environment variable access in app/layout.tsx
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
iOS-style glass components for React & React Native. Playground, CLI, shadcn registry and an MCP server for your AI agent.
Glass UI
iOS-style glass components for React and React Native, ready for you and your AI.
Tune seven glass primitives in a live playground, then take them into your project
with the CLI, the shadcn registry, an MCP server for your coding agent, or a GLASS.md file.
Why · Get started · AI agents · Components · How it works · What's new · Roadmap · Contributing
Why Glass UI
Glass effects look simple and are annoying to get right. The blur, the tint, the border that catches the light and
the opacity all have to agree with each other, and they look different on a white page, on a photo and on a phone.
On React Native it's a different API altogether. Most of us end up tweaking values by eye in every project.
Glass UI is one set of glass tokens and seven components (Card, Button, Input, Modal, Tab Bar, Switch and Nav Bar)
that look the same on the web and in Expo. You tune them once in the playground, with a real wallpaper behind them,
and you get typed TSX you can keep. Or you skip the playground and ask your coding agent for "a frosted login card":
the MCP server gives it the same components, presets and code.
It's free, MIT licensed, and everything is generated from a single package, so the playground, the CLI, the shadcn
registry and the MCP server never drift apart.
Get started
Pick whichever fits how you work. They all produce the same code.
| I want to… | Do this |
|---|---|
| See it and play with it | Open the playground |
| Add a component to my project | npx @lemuayala/glass-ui-core add card |
| Use it with shadcn/ui | npx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-card.json |
| Have my AI agent build with it | claude mcp add glass-ui -- npx -y @lemuayala/glass-ui-mcp |
| Paste a spec into any editor or chat | Copy GLASS.md from the playground's code panel |
CLI
The CLI writes a typed component file into your project (Next.js, Vite or Expo). No config needed.
npx @lemuayala/glass-ui-core add card
npx @lemuayala/glass-ui-core add button --preset liquid
npx @lemuayala/glass-ui-core add modal --native --glass-md # React Native + a GLASS.md next to it
Other flags: --nativewind (plain NativeWind classes instead of expo-blur), --inline, --dir <path>, --force.
shadcn registry
Every primitive, preset and platform is a registry item named <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
npx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-ui.json # all web primitives
The full index lives at /r/registry.json.
Use it with your AI agent
@lemuayala/glass-ui-mcp is a Model Context Protocol server. Once it's connected,
your agent knows the Glass UI components and builds them the way the playground does, instead of guessing atbackdrop-blur values. It's also listed in the official MCP Registry.
Claude Code
claude mcp add glass-ui -- npx -y @lemuayala/glass-ui-mcp
Cursor, Windsurf, Antigravity (add to your mcp.json)
{
"mcpServers": {
"glass-ui": { "command": "npx", "args": ["-y", "@lemuayala/glass-ui-mcp"] }
}
}
Then just ask: "Make me a frosted login card" or "Add a liquid glass tab bar to the Expo app".
What the server gives your agent:
| What it does | |
|---|---|
list_primitives |
The seven components, their options and defaults |
list_presets |
Frosted, Liquid Glass, Smoked, Crystal, Sunset and Aqua, with their exact values |
generate_component |
The TSX for web or React Native, a usage example and the install command (plus the shadcn command when there's a matching item) |
generate_glass_md |
A GLASS.md spec for the component |
glass_component prompt |
A ready-made prompt to build a component step by step |
On connect it also sends instructions, so the agent follows the same rules the project uses.
Components
| Primitive | Web | React Native |
|---|---|---|
| Card | ✅ | ✅ |
| Button | ✅ | ✅ |
| Input | ✅ | ✅ |
| Modal | ✅ | ✅ |
| Tab Bar | ✅ | ✅ |
| Switch | ✅ | ✅ |
| Nav Bar | ✅ | ✅ |
Every component takes the same glass options:
| Option | Values |
|---|---|
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 |
You can export each one two ways:
| Mode | Web | React Native |
|---|---|---|
| Inline snippet | Tailwind classes in JSX | expo-blur <BlurView> or NativeWind on View / Pressable |
| Reusable component | CVA variants + forwardRef |
Typed CVA component with <BlurView> or NativeWind |
GLASS.md
GLASS.md is a single file that describes the component you designed: the tokens, the generated TSX, a usage
example, where to put the files in your project (framework, paths, Tailwind version, package manager) and a short
checklist. Paste it into Cursor, Claude or Copilot and they have everything they need, without you re-explaining
the design.
How it works
Everything comes from one package, @lemuayala/glass-ui-core. It holds the variants, presets and code templates,
and every other piece is generated from it:
packages/core (variants, presets, TSX templates, GLASS.md builder)
├── CLI npx @lemuayala/glass-ui-core add …
├── shadcn registry /r/*.json, built from the same templates
├── packages/mcp @lemuayala/glass-ui-mcp, the server your agent talks to
└── this site the landing and the /play playground
So when a component changes in the core, the playground, the CLI, the registry and the MCP server all change with
it. Tests type-check every generated component against React, CVA, clsx and tailwind-merge, and after each release
CI installs both packages from npm to make sure they work as published.
What's new
Every release is written up in CHANGELOG.md and on the Releases page. The highlights so far:
- 0.6: shadcn-compatible registry, the MCP server suggests the shadcn command, and a smoke test against npm after every release.
- 0.5: the npm packages (
glass-ui-corewith the CLI, andglass-ui-mcp), real native blur withexpo-blur, and the full test suite in CI. - 0.4: GLASS.md, the project profile, the landing page, share links, and the Switch and Nav Bar components.
Roadmap
Done:
- Seven primitives on web and React Native, six presets
- GLASS.md and the target project profile
- npm package with a zero-config CLI
- MCP server for coding agents, listed in the MCP Registry
- shadcn-compatible registry
Next:
- Live native preview in the playground with Expo Snack
- Figma plugin, so designers can use the same tokens
- More presets and primitives (ideas welcome)
Have an idea or need something that isn't here? Open an issue and tell us what you're building.
Run it locally
You need Node 20.9 or newer (CI runs on 22) and pnpm.
git clone https://github.com/lemuayala/glass-ui.git
cd glass-ui
pnpm install
pnpm dev
The landing is at localhost:3000 and the playground at localhost:3000/play..env.example lists the optional settings (NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_GITHUB_URL).
| Command | What it does |
|---|---|
pnpm dev |
Dev server |
pnpm build |
Production build |
pnpm lint |
ESLint |
pnpm typecheck |
TypeScript check |
pnpm test |
Unit and integration tests (Vitest) |
pnpm test:coverage |
Tests with coverage thresholds |
pnpm test:e2e |
Browser tests, desktop and mobile (Playwright) |
pnpm icons:export |
Regenerate the app icons from the SVGs |
| 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 |
Tech stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| UI | React 19 |
| Styling | Tailwind CSS v4 |
| Variants | CVA |
| Native output | Expo expo-blur and NativeWind |
| Agents | Model Context Protocol SDK |
| Tests | Vitest, Testing Library, Playwright |
| Hosting | Vercel: previews on pull requests, production on main |
Contributing
Contributions of any size are welcome: bug reports, a new preset, translations, docs fixes, tests or a whole new
primitive. CONTRIBUTING.md explains the workflow, and AGENTS.md lists the steps for
adding a component. Please read the Code of Conduct, and report security issues privately as
described in SECURITY.md.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found