Moving an existing app
You can move an existing React and Tailwind app to Shavin one screen at a time. Old and new code run side by side. This is the general playbook. If you are coming from a specific library, its guide covers the details: Radix Themes, shadcn/ui or plain Tailwind CSS.
Beta
1. Install
npx @shavin/cli initIt adds Shavin next to your existing Tailwind setup without removing anything. See Installation.
2. Swap palette classes for tokens
This alone gives you dark mode and theming on screens you have not rewritten yet: bg-canvas for the page, bg-surface for cards, text-fg and text-fg-subtle for text, border-hairline for borders and bg-brand for primary actions. The full table from Tailwind palette classes to tokens is in From Tailwind CSS.
3. Replace hand-built pieces with components
This is where most of the code goes away. Before:
<div className="rounded-xl border border-gray-200 bg-white p-6 shadow-sm dark:border-gray-800 dark:bg-gray-900">
<h3 className="text-base font-semibold text-gray-900 dark:text-white">Billing</h3>
<p className="mt-1 text-sm text-gray-500 dark:text-gray-400">Manage your payment method.</p>
</div>After:
<Card padding="lg">
<Flex direction="column" gap="1">
<Heading as="h3" size="sm">Billing</Heading>
<Text size="sm" color="subtle">Manage your payment method.</Text>
</Flex>
</Card>4. Let your agent do the sweep
With the MCP server connected, ask your agent to audit a folder and fix it. It runs audit_source to find raw colours and off-token values, autofix_code for the mechanical swaps, and then rewrites the rest with components.
Audit src/features/billing for Shavin issues, fix what autofix can, then replace the hand-built cards and forms with Shavin components.5. Keep it from coming back
- Run
npx shavin-lint-tokensin CI to flag new raw colours and palette classes. - The dev inspector shows token problems on any page you open while developing.