/itixo-component-library:itixo-component-libraryfrom itixo-component-library
How to consume the @itixo/component-library npm package inside an external React app — DashboardLayout shell, design tokens, styling rules, and the component/prop reference. For adding the library to a project (scope mapping, install, stylesheet, ComponentLibraryProvider), use add-component-library-to-project; if npm cannot download the package on this machine, use unlock-itixo-packages. Use whenever an ITIXO app imports, themes, or upgrades @itixo/component-library, or whenever the user mentions ITIXO components, DashboardLayout, GenericTable, or design tokens. Trigger on indirect phrasing too — "add a button to match our other apps", "set up our shared layout", "what props does X take", "how do I theme this", "wire up the sidebar / breadcrumbs / waffle menu". When in doubt, trigger.
Ships in itixo-component-library. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
@itixo/component-library — consumer usage guideITIXO's shared design system: React 19 + Tailwind v4 + shadcn/Radix, packaged as @itixo/component-library on GitHub Packages under the ITIXO organization. It ships a DashboardLayout app shell and ~150 named exports (UI primitives, layout, hooks, types, utilities).
This skill is for agents working inside a consuming app, not inside the library repo itself.
Don't guess component names or props from memory — the library has its own catalog and the shapes drift between versions. Sources, in order:
The itixo-component-library MCP server — use this first. The library ships its own MCP server (registered as itixo-component-library; see the project's .mcp.json). It exposes the catalog, props, examples, theme tokens, and changelog directly — query it instead of grepping node_modules. Tools:
list_components — list/filter components by category (ui, form, layout, navigation, overlay, data, chart, utility).search_component — find a component by name/description/use ("loading", "date picker", "modal", …).get_component_props — exact props, types, required flags, defaults, and the import statement.get_component_example — copy-paste-ready TSX (optionally a named story variant).get_theme_tokens — exact CSS token names by category (color/spacing/radius/typography/shadow).get_changelog — structured release entries (optionally filtered by version).Don't mindlessly grep or scan node_modules/@itixo/component-library for types/usage — ask the MCP server.
references/components.md — offline quick reference: the full export catalog grouped by category (UI, forms, overlays, navigation, data, charts, utilities), with the notable props for each. Use when the MCP server isn't available.
The installed package's own types — node_modules/@itixo/component-library/dist/types/index.d.ts. The authoritative, version-exact fallback: every export, prop type, and JSDoc comment. When it disagrees with this skill, the .d.ts wins.
For design tokens (exact CSS variable names), use the MCP server's get_theme_tokens, see references/design-tokens.md, or search the installed stylesheet at node_modules/@itixo/component-library/dist/index.css.
This skill assumes the project is already set up: the @itixo:registry scope mapping in the project .npmrc, the package installed, @itixo/component-library/dist/index.css imported once in the global stylesheet, and ComponentLibraryProvider mounted once at the app root. If any of that is missing, use the add-component-library-to-project skill. If npm cannot download the package on this machine (401, no token), use the unlock-itixo-packages skill.
Single barrel. Always import from the package root, never from deep paths:
import { Button, Dialog, DialogContent, DialogTrigger, cn } from "@itixo/component-library";
The CSS side-effect (@itixo/component-library/dist/index.css) belongs in the app's global stylesheet, not per-component.
DashboardLayout — the recommended app shellFor any ITIXO app that needs a navbar + sidebar + content area with shared theming, account dropdown, agenda waffle menu, and breadcrumbs, drop in <DashboardLayout> and wire its props. Full prop walkthrough in references/dashboard-layout.md.
import { ComponentLibraryProvider, DashboardLayout, Badge, buildSiteMap } from "@itixo/component-library";
import Image from "next/image";
import Link from "next/link";
<ComponentLibraryProvider config={{ allowTheming: true }}>
<DashboardLayout
currentRoute={pathname}
user={{
name: "Jan Novák",
email: "[email protected]",
signOut: () => signOutFn(),
badges: <Badge variant="purple">Admin</Badge>,
}}
navbar={{ companyLogo: COMPANY_LOGO_BASE64, appName: "Dashboard UI" }}
navigation={{
sidebarRoutes: ROUTES,
siteMap: buildSiteMap(ROUTE_DEFINITIONS),
agendas: AGENDAS,
}}
adapters={{ Image, Link }} // inject the framework's Image/Link (Next.js, react-router, …)
>
{children}
</DashboardLayout>
</ComponentLibraryProvider>
Two patterns worth knowing up front:
adapters.Image and adapters.Link are slots — pass next/image and next/link's Link (or React Router's Link, etc.). The library never imports a framework directly.navigation={{ siteMap: buildSiteMap(ROUTE_DEFINITIONS) }} for auto-derivation, or navigation={{ breadcrumbs: [{ name, route? }, ...] }} for explicit control.Full guide in references/design-system-guidelines.md; layout spacing + a full page skeleton in references/dashboard-layout.md. These are the rules that, when skipped, produce subtly-wrong-looking ITIXO apps. Do not skip them.
Type scale, not Tailwind font sizes. The library has its own scale — raw text-sm / text-lg / text-xl / text-2xl bypass it and drift visually.
// ✗ <p className="text-sm text-gray-500">…</p> <h2 className="text-xl font-bold">…</h2>
// ✓
<Typography variant="heading-2" as="h2">Customers</Typography>
<Typography variant="small-text">View and manage accounts.</Typography>
<span className={cn(typographyVariants({ variant: "body-large" }))}>…</span>
Use <Typography> for all text — headings included (set the element with as="h1", as="h2", …). Typography variants: display-large, display, heading-1, heading-2, heading-3, body-large, base, small-text, smaller-text, smallest-text, label-text. The matching utilities are text-display-large … text-heading-1 … text-body-large … text-smaller-text. (text-base is the library's 1rem token and is fine; the other Tailwind text-* sizes are not.) Heading is deprecated — don't use it; use <Typography variant="heading-1" as="h1"> etc. instead.
Don't add outer page margins/padding. DashboardLayout already wraps children in py-5 sm:px-5 (no max-width). Re-padding the top node double-spaces it and looks asymmetrical.
// ✗ <div className="container mx-auto p-6"> … </div>
// ✓ <div className="space-y-4"> … </div> // space *between* cards only
Cards are the default surface — don't put content on the raw background. The layout background is bg-background (low-contrast gray/dark); text and controls placed directly on it look washed-out (gray-on-gray). Group page content into <Card> (which is bg-surface).
// ✗ <div className="space-y-4"><h2>Title</h2><Input … /></div> // on bg-background
// ✓
<Card>
<CardHeader><CardTitle>Title</CardTitle></CardHeader>
<CardContent> … </CardContent>
</Card>
Always use CardHeader / CardContent / CardFooter as Card's direct children — never raw content directly inside Card.
Form controls must sit on a surface. <Input>, <Select>, <Textarea> have a transparent background by default — correct on bg-surface / inside a Card, unreadable on bg-background. Put every form inside a <Card> (or another bg-surface container).
Merge classes with cn() from the library — not raw clsx, not template strings.
import { cn } from "@itixo/component-library";
<div className={cn("flex gap-2", isActive && "bg-surface-accent", className)} />
The library's cn() is a tailwind-merge extension that understands library-specific class groups (text-heading-1, bg-surface, custom shadows/radii). Plain tailwind-merge will merge incorrectly.
Use design tokens, never hex/raw values. Find the exact CSS variable name in references/design-tokens.md. Categories: color, spacing, radius, typography, shadow. Theming flips via CSS variables — hardcoded values break dark mode and the role-based color override.
Typography hierarchy. Heading variants must reflect the actual nesting level — page title = heading-1 or heading-2, section/card title = heading-2 or heading-3, body = base. Don't reuse heading-1 for every title or pick variants by size alone. See the Hierarchy rules table in references/design-system-guidelines.md.
Dialog & Popover buttons. Cancel + Confirm pairs: right-aligned (DialogFooter / flex justify-end gap-2), Cancel → Confirm order (left to right), variant="outline" for Cancel, variant="default" for Confirm.
Async button loading state. Any button that fires an API call must preserve its width (min-w-[...]), render <Spinner size="sm" /> while loading, and be disabled={isLoading}. Spinner's size is "sm" | "md" | "lg" (16/24/32px) or a pixel number. (width/height still work but are deprecated — prefer size.)
Destructive actions need AlertDialog. Delete / Remove / Reset / Archive must confirm via AlertDialog before the mutation runs — never wire a destructive call directly to onClick.
The library ships frequent fixes and occasional breaking changes (e.g. 0.3.0 reworked breadcrumbs, 0.3.1 changed RowId typing on GenericTable). The installed version is the source of truth — check node_modules/@itixo/component-library/package.json for the version, the MCP server's get_changelog for what changed, and the bundled types (dist/types/index.d.ts) for the current API. Don't recite component APIs from training data — they're wrong by definition for any version newer than your knowledge cutoff.
tailwind.config.* file; config is CSS-native via the imported stylesheet. Peer dep: tailwindcss ^4.1.10.Form + FormField), Toast (Toaster + toast()), and more.Link/Image via the slot props.onClick. Every Delete / Remove / Reset must go through AlertDialog to confirm before the mutation fires.<Spinner>, and set disabled={isLoading} — don't just disable without visual feedback.toast.*() requires an object, not a string. Unlike react-hot-toast or sonner, this library's toast.success / error / warning / info accept ToastOptions, not a plain string. Pass { title, description? }:
// ✗ toast.success("Project updated"); // TS error
// ✓ toast.success({ title: "Project updated", description: "Changes were saved." });
DashboardLayout prop walkthrough + breadcrumb modes + migration notescn(), Typography, color scheme, forms, tables, do's and don'tsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub itixo/itixo-marketplace --plugin itixo-component-library3 skills in this plugin
/add-component-library-to-projectAdd @itixo/component-library to a React project — the `@itixo:registry` scope mapping in the project `.npmrc`, installing the package with tailwindcss 4, importing the library stylesheet into the global CSS, and mounting ComponentLibraryProvider with its config options. Use when a project does not have @itixo/component-library yet, when setting up a new ITIXO frontend, when the project `.npmrc` lacks the @itixo scope mapping (404 from registry.npmjs.org), when library components render unstyled, or when ComponentLibraryProvider is missing or misconfigured. Trigger on indirect phrasing too — "add our component library here", "set up the design system in this app", "wire up the provider", "components have no styles"./unlock-itixo-packagesSet up a developer machine so npm can download @itixo packages (such as @itixo/component-library) from GitHub Packages — classic personal access token with read:packages, SSO authorization, and storing it in the user-level `~/.npmrc`. Use when a developer is new on a project, runs `npm install` / `pnpm install` for the first time, or the install fails on an @itixo package — 401 "authentication token not provided", "User cannot be authenticated with the token provided", 404 from registry.npmjs.org, or questions about PAT tokens, `~/.npmrc`, SSO authorization, or a hanging `npm login`. Trigger on indirect phrasing too — "I can't install the project", "npm can't find @itixo", "how do I get access to our packages".