Repository avatar
AI Tools
v0.7.0
active

glass-ui

io.github.lemuayala/glass-ui

iOS-style glassmorphism components and GLASS.md specs for Tailwind and React Native.

Documentation


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.


Live Demo Playground npm core npm mcp
Next.js React Tailwind CSS Expo License PRs Welcome


Glass UI playground with a glass card over a wallpaper Glass UI code panel with the exported TSX and GLASS.md

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 itOpen the playground
Add a component to my projectnpx @lemuayala/glass-ui-core add card
Use it with shadcn/uinpx shadcn@latest add https://glass-ui-play.vercel.app/r/glass-card.json
Have my AI agent build with itclaude mcp add glass-ui -- npx -y @lemuayala/glass-ui-mcp
Paste a spec into any editor or chatCopy 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 at backdrop-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_primitivesThe seven components, their options and defaults
list_presetsFrosted, Liquid Glass, Smoked, Crystal, Sunset and Aqua, with their exact values
generate_componentThe 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_mdA GLASS.md spec for the component
glass_component promptA 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

PrimitiveWebReact Native
Card✅✅
Button✅✅
Input✅✅
Modal✅✅
Tab Bar✅✅
Switch✅✅
Nav Bar✅✅

Every component takes the same glass options:

OptionValues
themelight · dark
blurnone · sm · md · lg · xl
roundednone · md · lg · xl · 2xl · 3xl · full
intensitysubtle · medium · strong
bordernone · subtle · strong
paddingsm · md · lg
shadownone · sm · md · lg
tintnone · blue · pink · orange · teal

You can export each one two ways:

ModeWebReact Native
Inline snippetTailwind classes in JSXexpo-blur <BlurView> or NativeWind on View / Pressable
Reusable componentCVA variants + forwardRefTyped 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-core with the CLI, and glass-ui-mcp), real native blur with expo-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).

CommandWhat it does
pnpm devDev server
pnpm buildProduction build
pnpm lintESLint
pnpm typecheckTypeScript check
pnpm testUnit and integration tests (Vitest)
pnpm test:coverageTests with coverage thresholds
pnpm test:e2eBrowser tests, desktop and mobile (Playwright)
pnpm icons:exportRegenerate the app icons from the SVGs
Playground keyboard shortcuts
ShortcutAction
1–7Switch component
TComponent theme
PPresets
SCopy share link
LLanguage
Shift+TApp theme
?Shortcuts
EscClose dialogs

Tech stack

LayerTechnology
FrameworkNext.js 16 (App Router)
UIReact 19
StylingTailwind CSS v4
VariantsCVA
Native outputExpo expo-blur and NativeWind
AgentsModel Context Protocol SDK
TestsVitest, Testing Library, Playwright
HostingVercel: 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.


Built with ❤️ by lemuayala

⭐ Star on GitHub · ▶ Open the playground · Report an issue



MIT License

NPM
@lemuayala/glass-ui-mcp
Install Command
npm install @lemuayala/glass-ui-mcp