Introduction
glasscn
Liquid Glass components for shadcn: Apple-inspired controls and system materials, built on Radix and Tailwind v4, installed as source.
glasscn is a shadcn registry. You don’t install a package: the shadcn CLI copies each component into your project, where it’s yours to read and change. Components keep shadcn’s APIs where one exists, so @/components/ui/button becomes @/components/glass/button and nothing else changes.
Everything visual is a CSS variable — the frost, the rim, the blur and saturation, the aurora’s three colours — set by one foundation item and a palette theme. Start with Installation, then make it yours in Theming.
Surfaces
Aurora
The living ground: three palette blobs drifting over the base colour. Pure CSS, reduced-motion aware.
Backdrop
A ground for glass besides the aurora: a photo with an optional scrim, a muted looping video (paused under reduced motion), a palette mesh, or a fine noise.
Glass
A glass pane — material (content) or liquid (control layer, regular or clear). Intensity, tint and elevation variants; asChild.
Liquid glass
A floating regular or clear lens with optical edge refraction, pointer illumination and optional light tracking. Dim bright media beneath clear controls.
Card
shadcn's Card API on glass: header, title, description, action, content, footer, a hero image — regular, thick or solid material, and asChild for a pressable link card.
Theme scope
Re-theme a subtree at runtime: a different palette, material, shape or scheme for one card, section or preview.
Background extension
Mirrored, softened imagery continues beneath leading and trailing chrome. Foreground content renders once.
Scroll area
shadcn's ScrollArea with capsule thumbs that read on glass, a focusable viewport and optional faded edges.
Accordion
Apple's disclosure rows: a trailing chevron that turns down, content that slides open, plain or as an inset grouped list.
Collapsible
Show and hide a region from a trigger, with a measured height animation.
Alert
An inline callout on a fill: icon, title, description and an action; info, success and destructive tints.
Item
shadcn's Item: a flexible row of media, title, description and actions — plain, outlined or filled, in groups.
Empty
An empty state: an icon tile, a title (or “No results for …”), a description and actions.
Typography
Controls
Button
shadcn's Button with liquid glass, prominent (tinted liquid), tinted and secondary variants; capsule or rounded, elastic press, a loading state, pull-down and split buttons.
Badge
Small capsule labels: solid, tinted, glass, secondary, outline, destructive.
Input
A filled field for glass: soft fill, accent caret and focus ring.
Textarea
A filled, auto-growing text area for glass.
Label
An accessible label.
Switch
The iOS 27 switch: a wide capsule fills with the accent; the knob stretches toward where it's going, turns into a lens while held and can be dragged.
Checkbox
shadcn's Checkbox on glass: a soft box that fills with the accent, with an indeterminate dash.
Segmented control
The iOS segmented control: one concentric thumb slides to the chosen segment and can be dragged across them as a lens; capsule or rounded, or momentary actions.
Tabs
Tabs with a sliding pill (glass capsule, plain) or a sliding underline.
Glass group
One shared liquid capsule for neighboring controls, with an optional sliding selection. Use GlassCluster for sibling shapes that merge and separate.
Glass cluster
Sibling controls form a shared glass contour as they approach. Smooth union mask on web; system glass container on native.
Glass morph
Stable sibling identities preserve continuity through insertion, removal and reordering. Native delegates to SwiftUI namespaces and effect IDs.
Slider
A soft track, an accent range and capsule knobs that turn into lenses while dragged. Ranges, ticks, a neutral origin, end icons, a value bubble and a thumbless progress variant.
Progress
A capsule bar filling from the second chart colour into the accent.
Kbd
Keycaps on glass, singly or grouped.
Separator
A hairline that reads on glass.
Avatar
shadcn's Avatar on glass: a round photo with a hairline rim, initials on a soft fill, and overlapping groups.
Glass preferences
The viewer's Liquid Glass setting: a Clarity slider (clear ↔ tinted) and a Reduce transparency switch that write --glass-clarity for the whole page, persisted, with a head script that applies it before paint.
Combobox
A searchable select (Popover + Command): single, or multiple with removable chips — a token field.
Calendar
react-day-picker on glass: circular days, an accent today, capsule-ended ranges, dropdown captions, RTL.
Date picker
A date, range or date-and-time behind a button — iOS's compact accent capsule or a form field — opening a calendar in a liquid popover; minute steps that divide 60.
Spinner
An activity indicator: an arc or iOS's radial ticks, a status with a label, a still frame under reduced motion. Button's loading state uses it.
Skeleton
A loading placeholder: a fill with a soft shimmer, still under reduced motion.
Select
shadcn's Select on glass: a field trigger, a liquid list that grows out of it with a leading check, groups and labels — or a pill pop-up button showing the current choice.
Radio group
shadcn's RadioGroup on glass: accent circles with a dot, 44pt hit areas, and a card variant where the whole tile selects.
Field
shadcn's Field: label, control, description and error laid out together — and wired: ids, htmlFor, aria-describedby and aria-invalid. Sets, legends, groups, horizontal rows.
Input group
One filled field holding an input or textarea and addons: a search icon, units, clear, password reveal, a submit capsule.
Button group
Buttons joined into one control — shared corners, hairlines between, either orientation — or floating on one liquid capsule like an Apple toolbar group.
Toggle
shadcn's Toggle: a two-state button that takes the accent's tint when on.
Toggle group
Toggles in a row, single or multiple choice, joined or spaced.
Stepper
Apple's − / + capsule pair: a spinbutton with arrow keys, Shift ×10 and hold-to-repeat, beside the value it changes.
Overlays
Dialog
A liquid-glass modal over a dimmed page that morphs out of its trigger (View Transitions) or materialises in place.
Alert dialog
An Apple-style alert on strong glass: a bold title, a short message and capsule actions — for confirming destructive or irreversible choices. Only its buttons close it.
Sheet
A floating glass panel that slides in from any edge, inset like an iPad sheet — with detents, a grabber, drag-to-dismiss and a non-modal inspector mode.
Action sheet
A short choice presentation with passive dismissal. Web uses Dialog and custom glass; supported native iOS choices use a source-anchored system confirmation dialog.
Popover
Floating glass content anchored to a trigger.
Tooltip
A small glass capsule on hover and focus.
Dropdown menu
A glass menu: items, checkbox and radio items, labels, shortcuts, submenus.
Toaster
Sonner toasts dressed in glass: bottom-right on wide screens, top-centre on phones, clear of the Dock and a top Toolbar.
Command
A cmdk command palette: a search capsule, groups, fill rows and shortcuts — CommandDialog floats it in a liquid panel for ⌘K.
Drawer
shadcn's Drawer API on the bottom Sheet: a grabber, medium and large detents, drag to resize or dismiss — no vaul.
Context menu
Right-click or long-press for the dropdown menu's liquid panel at the pointer, with a preview that lifts while it's open.
Confirmation popover
A destructive confirm anchored to the button that asked — an alertdialog popover with Cancel focused.
Navigation
Dock
The floating tab bar: a liquid capsule of destinations with a sliding pill and badges, drag-to-scrub, minimize on scroll, an accessory, a search tab and a tinted action button.
Toolbar
A floating toolbar on the control layer: button groups sharing one liquid capsule, spacers, a title, an overflow menu, a prominent action and minimize on scroll.
Scroll edge
Keeps bars legible over scrolling content — a progressive blur or a hard strip — and tells the bars when content is under them.
Navigation bar
iOS's navigation bar: a large title that scrolls away into a small inline one, leading and trailing slots.
Sidebar
An edge-attached liquid sidebar with accent symbols, compact modal navigation and image-only background extension.
Search field
A capsule search field: clear and cancel, a minimized button that morphs open, suggestions, and a bottom placement that rides the keyboard.
Grouped list
iOS Settings-style inset grouped rows on glass: headers, footers, icon tiles, values, chevrons.
Data
Activity rings
Apple's Activity rings: an angular gradient along each arc, round caps, endless laps past 100% with a shadow under the leading cap, and a glyph per ring. Server-component safe.
Progress ring
One ring that closes around its content — a goal, a countdown, a seal.
Sparkline
A smooth measure over time that draws itself, with a soft area and the latest point lit.
Stat
A figure on a fill tile (glass when standalone): label, value, trend with sentiment, a description, a chart slot, compact formatting and a skeleton.
KPI
A key figure from Stat: compact value, a trend coloured by whether up is good, context and a sparkline slot — or a skeleton while it loads.
Widget
Glanceable widgets at Apple's sizes — small, medium, large, extra large and the lock-screen circular, rectangular and inline — laid out by container queries, with an accented mode.
Range chart
Low-to-high capsules on a shared scale with a current dot — Weather's ten-day temperatures, Health's heart-rate ranges. Server-component safe.
Bar list
Ranked horizontal bars with the label inside and the value at the end — top habits, sources, pages.
Gauge
A three-quarter meter with an optional target tick and the figure in its bowl. Server-component safe.
Tracker
A row of status blocks — uptime, or a habit's last 30 days.
Category bar
A range split into coloured bands with a marker — a readiness score, a budget.
Heatmap
Days in week columns coloured by intensity — a contribution graph with month and weekday labels and a legend.
Chart
The chart host: TanStack Charts in a container that maps glass tokens — eight series colours, a glass-strong tooltip, Apple-style axes — plus loading/empty/error states, ChartDataTable and ChartSummary text alternatives, a legend and stable accessors.
Area chart
Volume over time: gradient areas under a line per series — stacked (diverging for negatives) or 100% — with scrubbing, selection and a grouped glass tooltip.
Bar chart
Amounts per category, grouped or stacked with separators, vertical or horizontal, theme-rounded bar ends and a selected bar.
Line chart
Measures over time, one smooth (or stepped) line per series, with scrubbing, selection, a grouped glass tooltip and a crosshair.
Donut chart
Parts of a whole as a ring of rounded slices: an "Other" past eight, a selected slice in the hole, legend values and shares in your locale.
Table
shadcn's Table for glass: hairline rows, fill on hover and selection, muted headers, density-aware cells.
Data table
shadcn's data table as one component on TanStack Table v9: search, faceted filters, column visibility, selection, rows per page — controlled, server (manual) and virtual modes, loading and error rows.
Chat
Chat
A conversation in parts: a thread that sticks to the latest message, user and assistant bubbles that group into runs, receipts, day dividers, typing dots, quick replies and a composer where Enter sends.
Chat markdown
Streaming-safe Markdown for chat replies — unclosed fences and marks closed as tokens arrive, GitHub tables and task lists — and ChatCodeBlock with language, copy, wrap and optional Shiki highlighting.
Chat parts
AI SDK UIMessage parts on glass: reasoning ("Thought for 12s"), tool calls with approve/deny, sources and citations, files and attachment chips, errors with retry, message actions, reactions — and renderParts(message).
Blocks
More Apple glass examplesblock
Landmarks extension and badges, Notes nonmodal formatting and adaptive toolbar, search placements and material comparisons.
Liquid Glass examplesblock
Six interactive Apple-inspired scenes: clear Photos controls, Music MiniPlayer and tabs, Maps search and sheet detents, Safari address bar, Mail sidebar and floating tools.
Dashboardblock
Activity rings, stat tiles, a ranged sparkline and a 39-week heatmap.
Analyticsblock
KPIs with deltas over the range, stacked active minutes, the training mix as a donut, a recovery gauge, top habits and a sortable table of recent sessions.
Settingsblock
iOS Settings in glass: grouped rows, icon tiles, a switch, a segmented control and a slider.
Sign inblock
A glass sign-in card with email, password and a passkey option.
Chatblock
A conversation on glass: grouped turns with avatars, a read receipt, typing that streams into a reply you can stop, message actions and a reaction, quick replies above a floating composer.