Ui component

From FrontDeskHQ/front-desk · View interactive version

Ui component is an AI agent skill from the GitHub repository FrontDeskHQ/front-desk. Create or edit core UI primitives in the FrontDesk @workspace/ui package (packages/ui/src/components/*.tsx) following the shadcn philosophy and FrontDesk's brand tokens, and author the matching UI Studio docs page. Use when the user wants to add, build, change, or document a shared UI component, des

How to use this skill

Skill file

UI component & docs

Build and maintain shared UI primitives in packages/ui (shadcn-style, owned in-repo) and their docs pages in the FrontDesk UI Studio. Scope: primitives in packages/ui/src/components/*.tsx — not blocks/ or app-level components.

Two deliverables, always together: the component and its docs page. A component without a docs page is incomplete.

Before writing

  1. Read 2-3 neighboring components to match current conventions — button.tsx (cva + forwardRef + Base UI), card.tsx (compound, data-slot), composite.tsx (context + useRender). New components are Base UI only (@base-ui/react) — never add Radix, even where older components use it.
  2. Skim REFERENCE.md for the styling tokens and rules.
  3. For edits: find the component's existing docs route and update it in lockstep.

Build the component

Start from templates/component.tsx. Then verify against REFERENCE.md:

Build the docs page

Read DOCS_TEMPLATE.md (the format spec) and start from templates/docs-page.tsx.

  1. Ensure the doc kit exists. If packages/ui/src/routes/-components/doc-kit.tsx is missing, create it from templates/doc-kit.tsx. Otherwise reuse it.
  2. Create packages/ui/src/routes/<name>.tsx following the fixed structure: meta export → DocPage → Demo sections → PropsTable → Anatomy (compound only).
  1. Register it in routes/-components/sidebar.tsx under the Components group (new SidebarMenuItem, data-active on the pathname, <Link to="/<name>">). The page is unreachable until linked.

Finish

Mention the user can preview at the UI Studio with bun run --filter @workspace/ui ui:dev.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.