# Glyph

> Glyph is a React 19 component library on Tailwind CSS v4, built for AI coding agents: an MCP server, this file and a Markdown version of every docs page give agents the real API for one exact version. One typed theme file sets color, type, shape, depth, motion and per-component defaults. Beyond components it ships solved patterns: schema-validated forms, a data table with server mode and URL state, app layout, charts, authentication with protected routes, and file viewers.

Current version: 0.8.2. Packages: @glyphui/ui, @glyphui/blocks, @glyphui/auth, @glyphui/viewers, @glyphui/tokens, @glyphui/mcp (released together; keep them on the same version).

Install: `npm install @glyphui/ui`, then import `@glyphui/ui/fonts.css`, `tailwindcss` and `@glyphui/ui/styles.css` in your CSS and wrap the app in `<GlyphProvider>`.

Coding agents: the MCP server `@glyphui/mcp` serves these docs as tools (component props, examples, setup, theming, search). Claude Code: `claude mcp add glyph -- npx -y @glyphui/mcp`. Cursor, VS Code, Codex, Windsurf and Claude Desktop: https://glyphui.xyz/docs/ai.md. Any docs URL returns Markdown when requested with `Accept: text/markdown`.

When writing code with Glyph:

- Look up a component before using it (`get_component` in the MCP server, or its `.md` page below). Don't guess props.
- Import from the entry each component page lists, such as `@glyphui/ui/form` or `@glyphui/ui/data-table`, not always `@glyphui/ui`.
- Style through the theme file and token utilities (`bg-primary`, `text-muted-foreground`), not hard-coded colors.
- Prefer an existing pattern or block (Form, DataTable, AppShell, `@glyphui/blocks`) over rebuilding it from primitives.
- Keep labels, `aria-label` on icon-only buttons, and keyboard behavior.

## Guides

- [Getting started](https://glyphui.xyz/docs/getting-started.md): Install Glyph, add a theme file, and wrap your app.
- [Use with AI agents](https://glyphui.xyz/docs/ai.md): Give Claude Code, Cursor, Codex, VS Code and other coding agents Glyph's real API.
- [Theming](https://glyphui.xyz/docs/theming.md): One typed theme file: colors, type, shape, depth, motion and component recipes.
- [Motion](https://glyphui.xyz/docs/motion.md): Motion levels, springs, reduced motion and the animation primitives.
- [Routing](https://glyphui.xyz/docs/routing.md): Connect React Router, TanStack Router or Next.js for links and active items.
- [Forms](https://glyphui.xyz/docs/forms.md): Schema-validated forms with server errors, in pages and modals.
- [Data tables](https://glyphui.xyz/docs/data-tables.md): Sorting, filters, server mode, URL state, bulk actions and virtualization.
- [Authentication](https://glyphui.xyz/docs/auth.md): Sessions, protected routes and sign-in screens against your own API.
- [File viewers](https://glyphui.xyz/docs/viewers.md): PDF, CSV, spreadsheets, JSON, code, Markdown, diffs and media.
- [Accessibility](https://glyphui.xyz/docs/accessibility.md): What Glyph handles for you, and what each app still has to do.
- [Testing your app](https://glyphui.xyz/docs/testing.md): Unit and end-to-end tests for screens built with Glyph.
- [Upgrading](https://glyphui.xyz/docs/migration.md): Breaking changes and how to move between versions.

## Actions

- [Button](https://glyphui.xyz/components/button.md): Triggers an action. Six variants, three sizes, icons, a loading state, and asChild for links.
- [CopyButton](https://glyphui.xyz/components/copy-button.md): Copies a value to the clipboard and confirms it with a check and a screen-reader announcement.
- [Toggle](https://glyphui.xyz/components/toggle.md): A two-state button, and ToggleGroup for toolbars: single choice like alignment or multiple like bold and italic.

## Forms

- [Calendar](https://glyphui.xyz/components/calendar.md): A month grid for picking one date, several dates or a range. The building block behind DatePicker.
- [Checkbox](https://glyphui.xyz/components/checkbox.md): A checkbox with checked, unchecked and indeterminate states.
- [Combobox](https://glyphui.xyz/components/combobox.md): A select with search for long option lists. Single or multiple values; the value type comes from your options.
- [DatePicker](https://glyphui.xyz/components/date-picker.md): A date field that opens a calendar, plus DateRangePicker with presets like “Last 7 days”.
- [Field](https://glyphui.xyz/components/field.md): Wraps one control with its label, description and error, and wires the ARIA attributes between them.
- [FileUpload](https://glyphui.xyz/components/file-upload.md): Drag-and-drop or click to choose files, with type, size and count checks and a file list with progress.
- [Input](https://glyphui.xyz/components/input.md): A single-line text field with optional prefix and suffix content.
- [InputOTP](https://glyphui.xyz/components/input-otp.md): One-time code input with a box per character, paste support and SMS autofill on mobile.
- [Label](https://glyphui.xyz/components/label.md): An accessible label for a form control. Field renders one for you.
- [NumberInput](https://glyphui.xyz/components/number-input.md): A number field with − / + steppers, arrow-key stepping, min/max clamping and locale formatting.
- [PasswordInput](https://glyphui.xyz/components/password-input.md): A password field with a show/hide toggle and an optional strength meter.
- [RadioGroup](https://glyphui.xyz/components/radio-group.md): Pick exactly one option from a short visible list. The card variant makes each option a selectable card.
- [SegmentedControl](https://glyphui.xyz/components/segmented-control.md): Pick exactly one of a few options. The value type is inferred from the options.
- [Select](https://glyphui.xyz/components/select.md): A dropdown for choosing one option from a short list. The value type is generic.
- [Slider](https://glyphui.xyz/components/slider.md): Choose a number, or a range with two thumbs, by dragging or with the arrow keys.
- [Switch](https://glyphui.xyz/components/switch.md): An on/off toggle for settings that apply immediately.
- [TagInput](https://glyphui.xyz/components/tag-input.md): A free-form multi-value input: Enter or a comma turns text into removable tags. Good for labels, emails and keywords.
- [Textarea](https://glyphui.xyz/components/textarea.md): A multi-line text field that grows with its content.

## Overlays

- [Alert Dialog](https://glyphui.xyz/components/alert-dialog.md): Interrupts to ask for a decision, such as confirming a destructive action. useConfirm() turns it into one awaited line.
- [ContextMenu](https://glyphui.xyz/components/context-menu.md): A menu opened by right-click or long-press on an area, with the same items as DropdownMenu.
- [Dialog](https://glyphui.xyz/components/dialog.md): A modal window for focused tasks such as editing a record or filling a short form.
- [Dropdown Menu](https://glyphui.xyz/components/dropdown-menu.md): A menu of actions opened from a button: row actions, account menus and "more" buttons.
- [HoverCard](https://glyphui.xyz/components/hover-card.md): A rich preview shown while hovering or focusing a link, such as a user or repository card.
- [Modal](https://glyphui.xyz/components/modal.md): The everyday modal in one component: pass a title, description, body and footer. Built on Dialog.
- [Popover](https://glyphui.xyz/components/popover.md): Floating content anchored to a trigger, for quick settings, details or a small form.
- [Sheet](https://glyphui.xyz/components/sheet.md): A panel that slides in from any edge for filters, record details, settings or navigation.
- [Tooltip](https://glyphui.xyz/components/tooltip.md): A short hint shown on hover or keyboard focus.

## Navigation

- [Breadcrumb](https://glyphui.xyz/components/breadcrumb.md): Shows where the current page sits in the hierarchy, with links back up the trail.
- [CommandMenu](https://glyphui.xyz/components/command-menu.md): A ⌘K command palette: search, grouped actions and keyboard navigation in a modal dialog.
- [Link](https://glyphui.xyz/components/link.md): A text link with an animated underline. Internal links use your router; external ones open safely in a new tab.
- [NavigationMenu](https://glyphui.xyz/components/navigation-menu.md): Site navigation with dropdown panels for marketing headers, including mega-menu link cards.
- [Pagination](https://glyphui.xyz/components/pagination.md): Moves between pages of a long list. Controlled, with buttons or real links.
- [Stepper](https://glyphui.xyz/components/stepper.md): Progress through a multi-step flow such as onboarding or checkout, horizontal or vertical.
- [Tabs](https://glyphui.xyz/components/tabs.md): Switches between related panels of content. Underline and pill variants.

## Feedback

- [Alert](https://glyphui.xyz/components/alert.md): An inline message about the content around it, in five tones, with optional actions and dismissal.
- [Banner](https://glyphui.xyz/components/banner.md): A full-width announcement bar for the top of a page or section, optionally dismissible and remembered.
- [Progress](https://glyphui.xyz/components/progress.md): A bar or ring showing how far a task has got, or an indeterminate bar while the length is unknown.
- [Skeleton](https://glyphui.xyz/components/skeleton.md): A placeholder block shown while content loads. Size it with utility classes.
- [Spinner](https://glyphui.xyz/components/spinner.md): An indeterminate loading indicator that inherits the current text color.
- [Toast](https://glyphui.xyz/components/toast.md): Brief notifications sent from anywhere with toast(). Built on Sonner and styled entirely by the theme.

## Data display

- [Accordion](https://glyphui.xyz/components/accordion.md): Stacked sections that expand one at a time or independently. Good for FAQs and dense settings.
- [Avatar](https://glyphui.xyz/components/avatar.md): A person or team image with an initials fallback in a stable color per name.
- [Badge](https://glyphui.xyz/components/badge.md): A short status or label. Six tones, three variants, and an optional status dot.
- [Carousel](https://glyphui.xyz/components/carousel.md): Swipeable, keyboard-accessible slides for testimonials, media and onboarding.
- [Chart](https://glyphui.xyz/components/chart.md): Line, area, bar and composed charts with interactive legends, reference lines, zoom, and loading, error and empty states, all colored by the theme.
- [ChartCard](https://glyphui.xyz/components/chart-card.md): A card for one chart with a period selector, a “view as table” toggle and PNG or SVG download. exportChart downloads any chart.
- [Collapsible](https://glyphui.xyz/components/collapsible.md): Shows and hides one region, such as advanced options or the rest of a long list.
- [DescriptionList](https://glyphui.xyz/components/description-list.md): Label–value pairs such as account details, order metadata or settings summaries.
- [FunnelChart](https://glyphui.xyz/components/funnel-chart.md): How many make it through each step of a flow, with the conversion from the previous step or from the start.
- [Gauge](https://glyphui.xyz/components/gauge.md): A single value against a range, with optional colored bands such as healthy, slow and failing.
- [Heatmap](https://glyphui.xyz/components/heatmap.md): Activity per day over months, like a contribution calendar. Every day is a keyboard-reachable cell with a tooltip.
- [Kbd](https://glyphui.xyz/components/kbd.md): A keyboard key or shortcut hint.
- [PieChart](https://glyphui.xyz/components/pie-chart.md): Parts of a whole as a pie or donut, with slice labels, a highlighted slice on hover and a legend that hides slices.
- [RadarChart](https://glyphui.xyz/components/radar-chart.md): Compare a few items across several measures on a radar, or show progress toward goals as radial bars.
- [SankeyChart](https://glyphui.xyz/components/sankey-chart.md): Where a quantity flows between stages, e.g. traffic sources to pages to signups. Links are given by node name.
- [ScatterChart](https://glyphui.xyz/components/scatter-chart.md): How two measures relate, one dot per item. Add size for a bubble chart and groupBy for colored groups.
- [Sparkline](https://glyphui.xyz/components/sparkline.md): A tiny trend without axes, for stat cards and table cells: area, line or bars, with optional high and low marks.
- [StatCard](https://glyphui.xyz/components/stat-card.md): A key metric with its change versus the previous period, an optional icon and a small chart.
- [Table](https://glyphui.xyz/components/table.md): Semantic table primitives styled by the theme. For sorting, search and paging use DataTable.
- [Timeline](https://glyphui.xyz/components/timeline.md): A vertical list of events in order, for activity feeds, changelogs and order tracking.
- [Treemap](https://glyphui.xyz/components/treemap.md): Sizes of many parts of a whole as nested rectangles, grouped and colored by category.
- [TreeView](https://glyphui.xyz/components/tree-view.md): A nested, expandable list for file trees and hierarchies, with full keyboard navigation.

## Typography

- [Blockquote](https://glyphui.xyz/components/blockquote.md): A quotation set in the display font, with an accent rule and optional attribution.
- [Code](https://glyphui.xyz/components/code.md): Inline code for running text, and CodeBlock for snippets with a file name and a copy button.
- [Eyebrow](https://glyphui.xyz/components/eyebrow.md): A small uppercase label that sits above a heading.
- [Heading](https://glyphui.xyz/components/heading.md): A heading whose document level and visual size are set independently, using the theme type scale.
- [Prose](https://glyphui.xyz/components/prose.md): Styles raw HTML or MDX for long-form reading: headings, lists, links, quotes, code, tables and images.
- [Text](https://glyphui.xyz/components/text.md): Body copy in the theme type scale, with tones, weights, mono and truncation.

## Layout

- [AspectRatio](https://glyphui.xyz/components/aspect-ratio.md): Keeps images, video and embeds at a fixed width-to-height ratio so layouts do not shift while loading.
- [Card](https://glyphui.xyz/components/card.md): A surface that groups related content. Compose with CardHeader, CardTitle, CardBody and CardFooter.
- [Container](https://glyphui.xyz/components/container.md): Centers content at a readable maximum width with consistent side gutters.
- [Grid](https://glyphui.xyz/components/grid.md): Responsive equal-width columns, set per breakpoint, with gaps from the spacing scale.
- [Resizable](https://glyphui.xyz/components/resizable.md): Panels separated by draggable dividers, for editors, inboxes and split views.
- [ScrollArea](https://glyphui.xyz/components/scroll-area.md): A scrollable region with slim scrollbars colored by the theme, consistent across browsers.
- [Section](https://glyphui.xyz/components/section.md): A full-width page band with consistent vertical rhythm. Put a Container inside.
- [Separator](https://glyphui.xyz/components/separator.md): A thin divider between groups of content, horizontal or vertical.
- [Stack](https://glyphui.xyz/components/stack.md): Flex layout with gaps from the spacing scale. Column by default; direction="row" for horizontal.
- [VisuallyHidden](https://glyphui.xyz/components/visually-hidden.md): Hides content visually while keeping it available to screen readers, such as labels for icon-only controls.

## Patterns

- [AppShell](https://glyphui.xyz/components/app-shell.md): App layout with a sidebar and main area: desktop collapse to an icon rail, a mobile drawer, and a mobile top bar.
- [Async](https://glyphui.xyz/components/async.md): One convention for loading, error, empty and ready states. Works with TanStack Query results or useAsync.
- [DataTable](https://glyphui.xyz/components/data-table.md): The table every app needs: search, filter chips, multi-column sorting, pagination, selection with bulk actions, column controls, row links and details, inline editing and CSV export, in client or server mode.
- [Form](https://glyphui.xyz/components/form.md): Schema-validated forms: typed field names, wired labels and errors, server errors on the right field, submit progress.
- [Motion](https://glyphui.xyz/components/motion.md): Animation on by default and controlled from the theme: overlays spring out of their triggers, active indicators slide, lists animate, and sections reveal on scroll.
- [Navbar](https://glyphui.xyz/components/navbar.md): Site header built from data: brand, links and actions. Responsive, with a menu panel on small screens.
- [PageHeader](https://glyphui.xyz/components/page-header.md): The title block at the top of a page: optional eyebrow, title, description and actions.
- [Router integration](https://glyphui.xyz/components/router.md): Connect Glyph to your router once: links navigate client-side and navigation items mark the current page automatically.
- [Sidebar](https://glyphui.xyz/components/sidebar.md): Bordered navigation sidebar with sections, icons, counts and an accent bar on the active item.
- [Theming](https://glyphui.xyz/components/theme.md): One typed theme file controls color, type, shape, depth, motion and component defaults. Providers apply it and handle color mode.
- [Utilities](https://glyphui.xyz/components/utilities.md): The helpers Glyph components are built with, for building your own themed components.
- [Virtual rows](https://glyphui.xyz/components/data-table-virtual.md): Virtualization for DataTable: only the rows in view are rendered, so tables with tens of thousands of rows scroll smoothly.
- [Vite plugin](https://glyphui.xyz/components/vite-plugin.md): Injects the color-mode script into index.html, so dark-mode visitors never see a light flash before React loads.

## Auth

- [Auth provider](https://glyphui.xyz/components/auth.md): Session state for the whole app: who is signed in, their roles and permissions, and every sign-in action, from any backend.
- [AuthLayout](https://glyphui.xyz/components/auth-layout.md): A full-page frame for auth screens: the form on one half, a brand panel on the other; the panel hides on mobile.
- [Clerk bridge](https://glyphui.xyz/components/auth-clerk.md): Use Glyph’s guards, useAuth() and screens with Clerk: the bridge mirrors Clerk’s session into Glyph.
- [Code forms](https://glyphui.xyz/components/verify-email-form.md): Six-digit code steps: confirm an email after sign-up, or a second factor at sign-in. SignInForm and SignUpForm show them for you.
- [Firebase adapter](https://glyphui.xyz/components/auth-firebase.md): Glyph auth on Firebase Authentication: email and password, Google, GitHub, Apple and Microsoft, reset and verification emails.
- [MagicLinkCallback](https://glyphui.xyz/components/magic-link-callback.md): The page a sign-in link opens: trades the link’s token for a session, then continues where the user was going.
- [Memory adapter](https://glyphui.xyz/components/auth-memory.md): A complete auth backend in the browser for prototypes, demos and tests: sign-up, email codes, two-step, magic links, organizations.
- [Password reset](https://glyphui.xyz/components/password-reset.md): Request a reset email, then choose a new password from the link’s token or an emailed code.
- [Protected routes](https://glyphui.xyz/components/protected-routes.md): Guards and loaders for React Router: signed-out users go to sign-in and come back to where they were going.
- [REST adapter](https://glyphui.xyz/components/auth-rest.md): Connect Glyph auth to your own API: httpOnly cookie sessions or bearer tokens with refresh rotation.
- [Session dialogs](https://glyphui.xyz/components/session-dialogs.md): Sign back in when a session expires mid-task without losing the page, and warn before an idle sign-out.
- [SignInForm](https://glyphui.xyz/components/sign-in-form.md): The whole sign-in flow in one component: password, OAuth, email link, and the code steps the backend asks for.
- [SignUpForm](https://glyphui.xyz/components/sign-up-form.md): Account creation with name, email and a password strength meter, then the email-code step, ending signed in.
- [SocialButtons](https://glyphui.xyz/components/social-buttons.md): “Continue with …” buttons for the adapter’s OAuth providers, with brand marks drawn to each provider’s guidelines.
- [UserMenu](https://glyphui.xyz/components/user-menu.md): The signed-in user’s avatar menu, and an organization switcher for multi-workspace apps.

## Blocks

- [AuthCard](https://glyphui.xyz/components/auth-card.md): Sign-in or sign-up card with a ready email and password form, social buttons and a footer link.
- [Cta](https://glyphui.xyz/components/cta.md): The closing call to action near the end of a page, as a raised card or an open band.
- [Faq](https://glyphui.xyz/components/faq.md): Frequently asked questions as an accordion, stacked or with the header beside the questions.
- [FeatureGrid](https://glyphui.xyz/components/feature-grid.md): A grid of features or benefits, each with an icon, a title and a short description.
- [FeatureSplit](https://glyphui.xyz/components/feature-split.md): Feature rows that alternate text and media, for explaining a product in more depth than a grid allows.
- [Hero](https://glyphui.xyz/components/hero.md): The opening section of a page: headline, supporting text, actions, and optional media beside or below.
- [LogoCloud](https://glyphui.xyz/components/logo-cloud.md): A row of customer or partner logos, muted so they support the page rather than compete with it.
- [Newsletter](https://glyphui.xyz/components/newsletter.md): Email signup with validation and loading, success and error states built in.
- [Pricing](https://glyphui.xyz/components/pricing.md): Plan comparison with features, call-to-action buttons and an optional monthly / yearly switch.
- [SectionHeader](https://glyphui.xyz/components/section-header.md): Eyebrow, title and description at the top of a section. Most blocks use it; use it for your own sections too.
- [SiteFooter](https://glyphui.xyz/components/site-footer.md): Site-wide footer with brand, link columns, copyright and social links.
- [Stats](https://glyphui.xyz/components/stats.md): Headline numbers that back up a claim: customers, uptime, money saved.
- [Testimonials](https://glyphui.xyz/components/testimonials.md): Customer quotes with names and roles, as a grid or with one featured quote on top.

## Viewers

- [AudioPlayer](https://glyphui.xyz/components/audio-player.md): Audio with a waveform you can click to seek, plus play, time, volume and speed controls.
- [CodeViewer](https://glyphui.xyz/components/code-viewer.md): Source code with syntax colors from your theme, line numbers, highlighted lines, a wrap toggle and copy.
- [CsvViewer](https://glyphui.xyz/components/csv-viewer.md): Open a CSV as a table: typed columns, search, sort, filters from the data, column controls and export of the filtered rows.
- [DiffViewer](https://glyphui.xyz/components/diff-viewer.md): Compare two versions of a text, unified or side by side, with changed words highlighted and unchanged lines folded.
- [FilePreview](https://glyphui.xyz/components/file-preview.md): Show any file with the right viewer, picked from its name or type, with a download fallback. Pairs with FileUpload.
- [ImageViewer](https://glyphui.xyz/components/image-viewer.md): An image you can zoom, pan, rotate and download, with keyboard and touch support.
- [JsonViewer](https://glyphui.xyz/components/json-viewer.md): Explore JSON as a collapsible tree: search keys and values, expand to any depth, copy a value or its JSONPath, or read the raw text.
- [MarkdownViewer](https://glyphui.xyz/components/markdown-viewer.md): Render Markdown with your theme’s typography: GitHub tables, task lists, highlighted code blocks and heading links.
- [PdfViewer](https://glyphui.xyz/components/pdf-viewer.md): Read PDFs in the page: thumbnails, zoom, rotation, search with highlights, selectable text, download, print and fullscreen.
- [SpreadsheetViewer](https://glyphui.xyz/components/spreadsheet-viewer.md): Open an Excel workbook (.xlsx) as tabs of tables, with the cells’ numbers, dates and booleans kept as types.
- [VideoPlayer](https://glyphui.xyz/components/video-player.md): Video with themed controls: scrubbing with the buffered range, volume, speed, captions, picture in picture and fullscreen.

## Optional

- [Changelog](https://glyphui.xyz/changelog.md): every release, newest first
- [Everything in one file](https://glyphui.xyz/llms-full.txt)
