Files
zeekay 05fc512820 feat: sync upstream shadcn/ui — [email protected], v4 app, font system, chart improvements
Upstream sync from shadcn-ui/ui (1686 commits since last merge base).

Key changes:
- packages/shadcn upgraded to 4.1.0 (CLI font transformers, scaffold from github, chart colors)
- apps/v4 replaces apps/www as the primary docs/registry app
- Font system: 25+ heading font registries, font markers utility, @supports override
- Chart improvements: recharts v3 compat, radial chart fixes
- templates/ updated with monorepo variants (astro, vite, react-router, start)
- skills/shadcn AI skill definitions added
- deprecated/ removed (auth, auth-firebase, cli, www)

Preserved Hanzo-only paths: app/, pkg/, demo/, docs/, template/next/
2026-03-24 19:04:31 -07:00
..

Examples

This directory contains demo components for the component documentation.

Directory Structure

examples
├── base
│   ├── ui           # Auto-generated by build-registry.mts
│   ├── lib          # Auto-generated by build-registry.mts
│   ├── hooks        # Auto-generated by build-registry.mts
│   ├── button-demo.tsx
│   └── ...
├── radix
│   ├── ui           # Auto-generated by build-registry.mts
│   ├── lib          # Auto-generated by build-registry.mts
│   ├── hooks        # Auto-generated by build-registry.mts
│   └── ...
└── __index__.tsx     # Auto-generated by build-registry.mts

Adding a New Example

  1. Create a new .tsx file in examples/base or examples/radix:
// examples/base/button-loading.tsx
import { Button } from "@/examples/base/ui/button"

export function ButtonLoading() {
  return <Button disabled>Loading...</Button>
}
  1. Run the examples build to regenerate the index:
pnpm examples:build
  1. Use the example in documentation by referencing its name (filename without .tsx):
<ComponentPreview name="button-loading" />

Notes

  • The ui, lib, and hooks directories are auto-generated during pnpm registry:build. Do not edit files in these directories directly.
  • Example files should be placed directly in examples/base or examples/radix, not in subdirectories.
  • Both named exports and default exports are supported.
  • After adding or removing examples, run pnpm examples:build to update the index.