INSTRUCTIONS
Use the public xzero-ui MCP server at https://mcp.xzero.co.uk/mcp. The complete Free and Pro library is available through this service. No account, sign-in, token, or upstream fallback is required. If the service is unavailable, retry later; do not use upstream services.
Keep this file where your agent reads project rules: paste it into AGENTS.md or CLAUDE.md, or save it as .cursor/rules/arc.mdc with this header:
---
description: Xzero UI rules for React components, pages, and CSS modules
globs: ["**/*.tsx", "**/*.module.css"]
alwaysApply: false
---
The full skill (component choice, layout, motion, examples, review checklist) is at https://mcp.xzero.co.uk/r/skills/xzero/SKILL.md, installable with npx shadcn@4.23.0 add https://mcp.xzero.co.uk/r/xzero-skill.json.
Always
- Use an existing Xzero component or block before writing UI. Search with the Xzero MCP server (
https://mcp.xzero.co.uk/mcp, toolssearch_componentsandget_component; the first connection opens a browser sign-in) orhttps://ui.xzero.co.uk/llms.txt, and readhttps://ui.xzero.co.uk/components/<id>/markdownbefore using an item. Follow its "When not to use". - Use only documented props. Compose and wrap Xzero components; never fork or restyle their internals, and never reconstruct Pro source.
- One page container per app. Blocks fill their column with no second gutter or max width.
- One
h1, one primary button per surface (buttondefaults tovariant="primary", so setsecondaryorghoston the rest), one memorable detail per view. - Semantic tokens only:
--background,--surface,--surface-muted,--foreground,--text-secondary,--text-muted,--border,--accent,--success,--warning,--danger,--radius-*,--text-*,--space-*. - The accent marks active, selected, progress, and emphasized data. Status colors only for real status, with a label. Third-party logos in their real colors.
- Type: Geist for headings 30px and up, Inter for the rest, weights 400 and 500 only, sizes from the scale,
tabular-numsfor changing numbers. - Nested corners are concentric: inner radius = outer radius - padding.
- Motion from
@/components/xzero/lib/motion-tokens:spring.smooth(no overshoot) for panels and anything that reports state,spring.snappyfor presses,spring.morphfor shared highlights. Animate transform and opacity, one continuous movement, and a reduced motion branch for every animation. - First render is server-safe (no
window,localStorage,Date.now(), orMath.random()output), and animated elements keep stable keys. - Every data region has loading (
skeleton), empty (empty-state), error (inlinealert), and in-place success states. - Check 390, 768, 1024, and 1440px: no sideways scroll, wide tables scroll inside their card, touch targets at least 44px.
Never
- Eyebrow labels or overlines above headings; all caps or uppercase transforms.
- Em dashes in copy. Use a period, comma, colon, or parentheses.
- Hand-made focus rings, outlines, or halos, or any ring on pointer focus. Keyboard focus already gets Xzero's subtle
:focus-visiblering fromfoundation.css. - Raw hex, Tailwind color classes, weights above 500, or arbitrary font sizes.
- Decorative gradients, glows, or colored shadows in components; icons in rounded tiles; nested decorative cards.
- A toast as the only confirmation of a foreground action.
- Motion that loops without meaning or replays on every scroll.