---
site: ui.zyx.tw
url: https://ui.zyx.tw/
title: ui.zyx.tw
description: "Loki's design system. Grayscale tokens and lightweight components, served as a shadcn registry."
---

# ui.zyx.tw

Grayscale tokens and lightweight components, one shadcn registry.

ui.zyx.tw is the design system of the zyx.tw sites, served as a shadcn/ui registry. One `base` item carries the grayscale tokens, four type sizes (80, 24, 16 and 14px), square corners, two motion durations and the one monospace font, for a terminal look. Every component is a lightweight rewrite on Base UI primitives that keeps only the variants the zyx.tw apps use and takes every value from the tokens.

## Get started

Init a project on the base. It writes the tokens, adds the fonts and registers the `@zyx1121` registry:

```bash
bunx shadcn@latest init https://ui.zyx.tw/r/base.json
```

Then add components by name:

```bash
bunx shadcn@latest add @zyx1121/button @zyx1121/dialog
```

The CLI installs a stock button during init; add `@zyx1121/button` with `-o` to overwrite it.

## Items

### zyx Base (`base`)

The zyx.tw design system base: a terminal look in one monospace face, grayscale tokens, four type sizes, square corners and two motion durations.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/base.json`
- JSON: [base.json](https://ui.zyx.tw/r/base.json)
- npm dependencies: `class-variance-authority`, `cn`, `lucide-react`, `@base-ui/react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/font-noto-sans-tc.json`

### Corners (`corners`)

The four fixed corners every zyx.tw site shares: the zyx mark and the page nav on top, Privacy and Terms and the copyright below, each item with a tip.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/corners.json`
- JSON: [corners.json](https://ui.zyx.tw/r/corners.json)
- Page: [https://ui.zyx.tw/corners](https://ui.zyx.tw/corners) ([Markdown](https://ui.zyx.tw/corners.md))
- npm dependencies: `@base-ui/react`, `next`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/tooltip.json`

### Page Decode (`page-decode`)

The page motion: a page's text decodes in row by row as a terminal prints it, and scrambles out before a link within the app leaves it.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/page-decode.json`
- JSON: [page-decode.json](https://ui.zyx.tw/r/page-decode.json)
- Page: [https://ui.zyx.tw/page-decode](https://ui.zyx.tw/page-decode) ([Markdown](https://ui.zyx.tw/page-decode.md))
- npm dependencies: `next`

### Shell (`shell`)

Pieces of a shell session: a command after a muted prompt, a blinking block cursor and the requested path for a 404.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/shell.json`
- JSON: [shell.json](https://ui.zyx.tw/r/shell.json)
- Page: [https://ui.zyx.tw/shell](https://ui.zyx.tw/shell) ([Markdown](https://ui.zyx.tw/shell.md))
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Section Title (`section-title`)

A section's heading in brackets and capitals, as the corner nav marks the current page.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/section-title.json`
- JSON: [section-title.json](https://ui.zyx.tw/r/section-title.json)
- Page: [https://ui.zyx.tw/section-title](https://ui.zyx.tw/section-title) ([Markdown](https://ui.zyx.tw/section-title.md))
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Confirm Dialog (`confirm-dialog`)

Asks before an action, locks both buttons while it runs and closes when it finishes.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/confirm-dialog.json`
- JSON: [confirm-dialog.json](https://ui.zyx.tw/r/confirm-dialog.json)
- Page: [https://ui.zyx.tw/confirm-dialog](https://ui.zyx.tw/confirm-dialog) ([Markdown](https://ui.zyx.tw/confirm-dialog.md))
- Registry dependencies: `https://ui.zyx.tw/r/alert-dialog.json`, `https://ui.zyx.tw/r/button.json`

### Empty State (`empty-state`)

One sentence and the next step when a list or a search has no rows, with a table row variant.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/empty-state.json`
- JSON: [empty-state.json](https://ui.zyx.tw/r/empty-state.json)
- Page: [https://ui.zyx.tw/empty-state](https://ui.zyx.tw/empty-state) ([Markdown](https://ui.zyx.tw/empty-state.md))
- Registry dependencies: `https://ui.zyx.tw/r/button.json`, `https://ui.zyx.tw/r/table.json`

### Status Page (`status-page`)

A title and the way out, for not found, errors and no access.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/status-page.json`
- JSON: [status-page.json](https://ui.zyx.tw/r/status-page.json)
- Page: [https://ui.zyx.tw/status-page](https://ui.zyx.tw/status-page) ([Markdown](https://ui.zyx.tw/status-page.md))
- Registry dependencies: `https://ui.zyx.tw/r/shell.json`

### Alert Dialog (`alert-dialog`)

Confirmation dialog with Cancel and an action.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/alert-dialog.json`
- JSON: [alert-dialog.json](https://ui.zyx.tw/r/alert-dialog.json)
- Page: [https://ui.zyx.tw/alert-dialog](https://ui.zyx.tw/alert-dialog) ([Markdown](https://ui.zyx.tw/alert-dialog.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/button.json`, `https://ui.zyx.tw/r/frame.json`

### Attachment (`attachment`)

File chip with a media square, name and upload state.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/attachment.json`
- JSON: [attachment.json](https://ui.zyx.tw/r/attachment.json)
- Page: [https://ui.zyx.tw/attachment](https://ui.zyx.tw/attachment) ([Markdown](https://ui.zyx.tw/attachment.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Avatar (`avatar`)

Square 40px avatar with an initials fallback.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/avatar.json`
- JSON: [avatar.json](https://ui.zyx.tw/r/avatar.json)
- Page: [https://ui.zyx.tw/avatar](https://ui.zyx.tw/avatar) ([Markdown](https://ui.zyx.tw/avatar.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Badge (`badge`)

Status label: default, muted, outline, destructive.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/badge.json`
- JSON: [badge.json](https://ui.zyx.tw/r/badge.json)
- Page: [https://ui.zyx.tw/badge](https://ui.zyx.tw/badge) ([Markdown](https://ui.zyx.tw/badge.md))
- npm dependencies: `@base-ui/react`, `class-variance-authority`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Bubble (`bubble`)

Chat text: a muted bubble for the person, plain text for the reply.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/bubble.json`
- JSON: [bubble.json](https://ui.zyx.tw/r/bubble.json)
- Page: [https://ui.zyx.tw/bubble](https://ui.zyx.tw/bubble) ([Markdown](https://ui.zyx.tw/bubble.md))
- npm dependencies: `@base-ui/react`, `class-variance-authority`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Button (`button`)

Button in one 40px height: variants default, outline, ghost, destructive; sizes default and icon.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/button.json`
- JSON: [button.json](https://ui.zyx.tw/r/button.json)
- Page: [https://ui.zyx.tw/button](https://ui.zyx.tw/button) ([Markdown](https://ui.zyx.tw/button.md))
- npm dependencies: `@base-ui/react`, `class-variance-authority`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

### Calendar (`calendar`)

Month grid for picking one day, with 40px day buttons.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/calendar.json`
- JSON: [calendar.json](https://ui.zyx.tw/r/calendar.json)
- Page: [https://ui.zyx.tw/calendar](https://ui.zyx.tw/calendar) ([Markdown](https://ui.zyx.tw/calendar.md))
- npm dependencies: `cn`, `lucide-react`, `react-day-picker`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/button.json`

### Chart (`chart`)

Recharts container in the theme's colors, with a window tooltip.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/chart.json`
- JSON: [chart.json](https://ui.zyx.tw/r/chart.json)
- Page: [https://ui.zyx.tw/chart](https://ui.zyx.tw/chart) ([Markdown](https://ui.zyx.tw/chart.md))
- npm dependencies: `cn`, `recharts`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

### Checkbox (`checkbox`)

Square 20px checkbox.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/checkbox.json`
- JSON: [checkbox.json](https://ui.zyx.tw/r/checkbox.json)
- Page: [https://ui.zyx.tw/checkbox](https://ui.zyx.tw/checkbox) ([Markdown](https://ui.zyx.tw/checkbox.md))
- npm dependencies: `@base-ui/react`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Collapsible (`collapsible`)

Unstyled show / hide region.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/collapsible.json`
- JSON: [collapsible.json](https://ui.zyx.tw/r/collapsible.json)
- Page: [https://ui.zyx.tw/collapsible](https://ui.zyx.tw/collapsible) ([Markdown](https://ui.zyx.tw/collapsible.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Combobox (`combobox`)

Trigger and content for a searchable picker built from Popover and Command.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/combobox.json`
- JSON: [combobox.json](https://ui.zyx.tw/r/combobox.json)
- Page: [https://ui.zyx.tw/combobox](https://ui.zyx.tw/combobox) ([Markdown](https://ui.zyx.tw/combobox.md))
- npm dependencies: `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/field-trigger.json`, `https://ui.zyx.tw/r/popover.json`, `https://ui.zyx.tw/r/frame.json`

### Command (`command`)

Searchable list for a combobox inside a popover.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/command.json`
- JSON: [command.json](https://ui.zyx.tw/r/command.json)
- Page: [https://ui.zyx.tw/command](https://ui.zyx.tw/command) ([Markdown](https://ui.zyx.tw/command.md))
- npm dependencies: `cmdk`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`, `https://ui.zyx.tw/r/field-trigger.json`

### Dialog (`dialog`)

Modal window with title, description and footer; sizes default and wide.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/dialog.json`
- JSON: [dialog.json](https://ui.zyx.tw/r/dialog.json)
- Page: [https://ui.zyx.tw/dialog](https://ui.zyx.tw/dialog) ([Markdown](https://ui.zyx.tw/dialog.md))
- npm dependencies: `@base-ui/react`, `class-variance-authority`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/button.json`, `https://ui.zyx.tw/r/frame.json`

### Dropdown Menu (`dropdown-menu`)

Action menu window with labels, separators and one level of submenu.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/dropdown-menu.json`
- JSON: [dropdown-menu.json](https://ui.zyx.tw/r/dropdown-menu.json)
- Page: [https://ui.zyx.tw/dropdown-menu](https://ui.zyx.tw/dropdown-menu) ([Markdown](https://ui.zyx.tw/dropdown-menu.md))
- npm dependencies: `@base-ui/react`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

### Frame (`frame`)

Glyph frames: an outline drawn with box-drawing characters, so its lines run through the middle of a character cell and its corners are the font's arcs. Every window and field draws its edge with it.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/frame.json`
- JSON: [frame.json](https://ui.zyx.tw/r/frame.json)
- Page: [https://ui.zyx.tw/frame](https://ui.zyx.tw/frame) ([Markdown](https://ui.zyx.tw/frame.md))
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Field Trigger (`field-trigger`)

Shared class list for pick-a-value triggers.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/field-trigger.json`
- JSON: [field-trigger.json](https://ui.zyx.tw/r/field-trigger.json)

### Input Group (`input-group`)

Input with an icon, text or a button inside its border.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/input-group.json`
- JSON: [input-group.json](https://ui.zyx.tw/r/input-group.json)
- Page: [https://ui.zyx.tw/input-group](https://ui.zyx.tw/input-group) ([Markdown](https://ui.zyx.tw/input-group.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/button.json`, `https://ui.zyx.tw/r/input.json`, `https://ui.zyx.tw/r/frame.json`, `https://ui.zyx.tw/r/field-trigger.json`

### Input (`input`)

Text input, 40px tall to match Button.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/input.json`
- JSON: [input.json](https://ui.zyx.tw/r/input.json)
- Page: [https://ui.zyx.tw/input](https://ui.zyx.tw/input) ([Markdown](https://ui.zyx.tw/input.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`, `https://ui.zyx.tw/r/field-trigger.json`

### Label (`label`)

Form label in text-body, medium weight.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/label.json`
- JSON: [label.json](https://ui.zyx.tw/r/label.json)
- Page: [https://ui.zyx.tw/label](https://ui.zyx.tw/label) ([Markdown](https://ui.zyx.tw/label.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Mask Reveal (`mask-reveal`)

Reveals its content with a feathered mask sweeping left to right.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/mask-reveal.json`
- JSON: [mask-reveal.json](https://ui.zyx.tw/r/mask-reveal.json)
- Page: [https://ui.zyx.tw/mask-reveal](https://ui.zyx.tw/mask-reveal) ([Markdown](https://ui.zyx.tw/mask-reveal.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Message (`message`)

Chat transcript layout: groups, messages, content and footer.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/message.json`
- JSON: [message.json](https://ui.zyx.tw/r/message.json)
- Page: [https://ui.zyx.tw/message](https://ui.zyx.tw/message) ([Markdown](https://ui.zyx.tw/message.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Popover (`popover`)

Window anchored to a trigger.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/popover.json`
- JSON: [popover.json](https://ui.zyx.tw/r/popover.json)
- Page: [https://ui.zyx.tw/popover](https://ui.zyx.tw/popover) ([Markdown](https://ui.zyx.tw/popover.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

### Resizable (`resizable`)

Panels split by a hairline handle you can drag.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/resizable.json`
- JSON: [resizable.json](https://ui.zyx.tw/r/resizable.json)
- Page: [https://ui.zyx.tw/resizable](https://ui.zyx.tw/resizable) ([Markdown](https://ui.zyx.tw/resizable.md))
- npm dependencies: `cn`, `react-resizable-panels`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Scramble Text (`scramble-text`)

Text that resolves left to right from random glyphs, without moving layout.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/scramble-text.json`
- JSON: [scramble-text.json](https://ui.zyx.tw/r/scramble-text.json)
- Page: [https://ui.zyx.tw/scramble-text](https://ui.zyx.tw/scramble-text) ([Markdown](https://ui.zyx.tw/scramble-text.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Select (`select`)

Single-choice dropdown, as tall as Input.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/select.json`
- JSON: [select.json](https://ui.zyx.tw/r/select.json)
- Page: [https://ui.zyx.tw/select](https://ui.zyx.tw/select) ([Markdown](https://ui.zyx.tw/select.md))
- npm dependencies: `@base-ui/react`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/field-trigger.json`, `https://ui.zyx.tw/r/frame.json`

### Separator (`separator`)

Hairline divider, horizontal or vertical.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/separator.json`
- JSON: [separator.json](https://ui.zyx.tw/r/separator.json)
- Page: [https://ui.zyx.tw/separator](https://ui.zyx.tw/separator) ([Markdown](https://ui.zyx.tw/separator.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Sheet (`sheet`)

Full-height window on the left or right edge.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/sheet.json`
- JSON: [sheet.json](https://ui.zyx.tw/r/sheet.json)
- Page: [https://ui.zyx.tw/sheet](https://ui.zyx.tw/sheet) ([Markdown](https://ui.zyx.tw/sheet.md))
- npm dependencies: `@base-ui/react`, `cn`, `lucide-react`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/button.json`, `https://ui.zyx.tw/r/frame.json`

### Skeleton (`skeleton`)

Pulsing placeholder for loading content.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/skeleton.json`
- JSON: [skeleton.json](https://ui.zyx.tw/r/skeleton.json)
- Page: [https://ui.zyx.tw/skeleton](https://ui.zyx.tw/skeleton) ([Markdown](https://ui.zyx.tw/skeleton.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Slider (`slider`)

Range slider with a 4px track and 20px thumbs.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/slider.json`
- JSON: [slider.json](https://ui.zyx.tw/r/slider.json)
- Page: [https://ui.zyx.tw/slider](https://ui.zyx.tw/slider) ([Markdown](https://ui.zyx.tw/slider.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Sonner (`sonner`)

Toasts in a small window.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/sonner.json`
- JSON: [sonner.json](https://ui.zyx.tw/r/sonner.json)
- Page: [https://ui.zyx.tw/sonner](https://ui.zyx.tw/sonner) ([Markdown](https://ui.zyx.tw/sonner.md))
- npm dependencies: `lucide-react`, `sonner`

### Switch (`switch`)

On / off toggle, one size.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/switch.json`
- JSON: [switch.json](https://ui.zyx.tw/r/switch.json)
- Page: [https://ui.zyx.tw/switch](https://ui.zyx.tw/switch) ([Markdown](https://ui.zyx.tw/switch.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Table (`table`)

Data table with muted headers.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/table.json`
- JSON: [table.json](https://ui.zyx.tw/r/table.json)
- Page: [https://ui.zyx.tw/table](https://ui.zyx.tw/table) ([Markdown](https://ui.zyx.tw/table.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Tabs (`tabs`)

Segmented tabs with 40px triggers.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/tabs.json`
- JSON: [tabs.json](https://ui.zyx.tw/r/tabs.json)
- Page: [https://ui.zyx.tw/tabs](https://ui.zyx.tw/tabs) ([Markdown](https://ui.zyx.tw/tabs.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Textarea (`textarea`)

Multi-line input that grows with its content.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/textarea.json`
- JSON: [textarea.json](https://ui.zyx.tw/r/textarea.json)
- Page: [https://ui.zyx.tw/textarea](https://ui.zyx.tw/textarea) ([Markdown](https://ui.zyx.tw/textarea.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`, `https://ui.zyx.tw/r/field-trigger.json`

### Theme Toggle (`theme-toggle`)

Icon button that switches light and dark (next-themes).

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/theme-toggle.json`
- JSON: [theme-toggle.json](https://ui.zyx.tw/r/theme-toggle.json)
- Page: [https://ui.zyx.tw/theme-toggle](https://ui.zyx.tw/theme-toggle) ([Markdown](https://ui.zyx.tw/theme-toggle.md))
- npm dependencies: `lucide-react`, `next-themes`
- Registry dependencies: `https://ui.zyx.tw/r/button.json`

### Toggle (`toggle`)

Pressable button that stays on, the box of a ghost Button.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/toggle.json`
- JSON: [toggle.json](https://ui.zyx.tw/r/toggle.json)
- Page: [https://ui.zyx.tw/toggle](https://ui.zyx.tw/toggle) ([Markdown](https://ui.zyx.tw/toggle.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`

### Toolbar (`toolbar`)

Floating window of 40px controls over a canvas or map.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/toolbar.json`
- JSON: [toolbar.json](https://ui.zyx.tw/r/toolbar.json)
- Page: [https://ui.zyx.tw/toolbar](https://ui.zyx.tw/toolbar) ([Markdown](https://ui.zyx.tw/toolbar.md))
- npm dependencies: `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

### Tooltip (`tooltip`)

Short lowercase label in a small window on hover or focus.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/tooltip.json`
- JSON: [tooltip.json](https://ui.zyx.tw/r/tooltip.json)
- Page: [https://ui.zyx.tw/tooltip](https://ui.zyx.tw/tooltip) ([Markdown](https://ui.zyx.tw/tooltip.md))
- npm dependencies: `@base-ui/react`, `cn`
- Registry dependencies: `https://ui.zyx.tw/r/utils.json`, `https://ui.zyx.tw/r/frame.json`

## Agent kit

Server code for web apps with an agent in them, installed into `lib/agent/`: one tool registry for the page, the chat and MCP, an OpenAI-compatible model that waits out rate limits, sealed credentials, fetch that reaches public addresses only, and tracing. The rules are in DESIGN.md, Agent kit.

### Agent Telemetry (`agent-telemetry`)

OTLP tracing for agent apps: registerTelemetry for instrumentation.ts, inSpan, and a traced fetch for model calls that records the upstream provider. Off until OTEL_EXPORTER_OTLP_ENDPOINT is set; spans never carry content.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/agent-telemetry.json`
- JSON: [agent-telemetry.json](https://ui.zyx.tw/r/agent-telemetry.json)
- npm dependencies: `@opentelemetry/api`, `@opentelemetry/context-async-hooks`, `@opentelemetry/exporter-trace-otlp-http`, `@opentelemetry/resources`, `@opentelemetry/sdk-trace-base`

### Agent Model (`agent-model`)

Any OpenAI-compatible model for the AI SDK, configured from <PREFIX>MODEL_* variables, traced, and waiting out 429 rate limits until the gateway resets.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/agent-model.json`
- JSON: [agent-model.json](https://ui.zyx.tw/r/agent-model.json)
- npm dependencies: `ai`, `@ai-sdk/openai`, `@opentelemetry/api`
- Registry dependencies: `https://ui.zyx.tw/r/agent-telemetry.json`

### Agent Tools (`agent-tools`)

One tool registry for the page, the chat agent and MCP: zod input parsed once, run as the signed-in person, traced, with streamText tools and a stateless MCP endpoint from the same definitions.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/agent-tools.json`
- JSON: [agent-tools.json](https://ui.zyx.tw/r/agent-tools.json)
- npm dependencies: `ai`, `zod`, `@modelcontextprotocol/server`, `@opentelemetry/api`
- Registry dependencies: `https://ui.zyx.tw/r/agent-telemetry.json`

### Agent Seal (`agent-seal`)

AES-256-GCM sealing for credentials an agent uses but never sees, and redact to scrub their values (and their JSON and URL forms) from anything returned.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/agent-seal.json`
- JSON: [agent-seal.json](https://ui.zyx.tw/r/agent-seal.json)

### Agent Public Fetch (`agent-public-fetch`)

fetch for requests made on an agent's behalf that reaches public addresses only, checked inside the connection's own DNS lookup so DNS rebinding cannot slip through. Node.js only.

- Install: `bunx shadcn@latest add https://ui.zyx.tw/r/agent-public-fetch.json`
- JSON: [agent-public-fetch.json](https://ui.zyx.tw/r/agent-public-fetch.json)
- npm dependencies: `undici`

## More

- [llms.txt](https://ui.zyx.tw/llms.txt): the short index for agents
- [Agent instructions](https://ui.zyx.tw/agent-instructions.md): when to use this registry, the call order and the rules
- [Registry index](https://ui.zyx.tw/r/registry.json): every item in one JSON file
- [DESIGN.md](https://github.com/zyx1121/www.zyx.tw/blob/main/apps/ui/DESIGN.md): the design contract behind the theme and the components
- [Source](https://github.com/zyx1121/www.zyx.tw/tree/main/apps/ui): the Next.js app behind this site
