Tailwind CSS 3 Guides how to use Tailwind CSS v3 and Crispy design tokens in Lynx.
This guide is for existing Tailwind CSS v3 projects. If you're setting up new, choose Vanilla Extract or Tailwind CSS v4 in Installation .
With @seed-design/tailwind3-plugin, you can use Crispy tokens as utility classes for native <view> and <text>.
For projects using Tailwind CSS v4, see v4 configuration .
Theme configuration is covered in Theming .
npm install @seed-design/lynx-css tailwindcss@3 @seed-design/tailwind3-plugin pnpm add @seed-design/lynx-css tailwindcss@3 @seed-design/tailwind3-plugin yarn add @seed-design/lynx-css tailwindcss@3 @seed-design/tailwind3-plugin bun add @seed-design/lynx-css tailwindcss@3 @seed-design/tailwind3-plugin
import type { Config } from "tailwindcss" ;
import seedDesignPlugin from "@seed-design/tailwind3-plugin" ;
export default {
content: [ "./src/**/*.{jsx,tsx}" ],
corePlugins: { preflight: false },
plugins: [seedDesignPlugin],
} satisfies Config ;
export default {
plugins: {
tailwindcss: {},
},
};
@import "@seed-design/lynx-css/base.css" ;
@tailwind components;
@tailwind utilities;
Crispy color tokens are used with Tailwind's bg-, text-, border- prefixes.
// Background color
< view className = "bg-bg-layer-default" />
< view className = "bg-bg-neutral-weak" />
< view className = "bg-bg-brand-solid" />
// Text color
< text className = "text-fg-neutral" >Default text</ text >
< text className = "text-fg-brand" >Brand text</ text >
< text className = "text-fg-critical" >Error text</ text >
// Border color
< view className = "border border-stroke-neutral-muted" />
Crispy typography tokens are provided as component classes.
< text className = "t1-regular" >Smallest text</ text >
< text className = "t5-regular" >Default body</ text >
< text className = "t5-bold" >Bold body</ text >
< text className = "t7-bold" >Large title</ text >
< text className = "t10-bold" >Largest title</ text >
Use Tailwind's Flexbox utilities with native <view> elements.
// Flex row (HStack)
< view className = "flex flex-row gap-x2 items-center" >
< view className = "bg-bg-brand-weak px-x3 py-x2 rounded-r2" >
< text >A</ text >
</ view >
< view className = "bg-bg-brand-weak px-x3 py-x2 rounded-r2" >
< text >B</ text >
</ view >
</ view >
// Flex column (VStack)
< view className = "flex flex-col gap-x2" >
< text className = "t5-regular text-fg-neutral" >Item 1</ text >
< text className = "t5-regular text-fg-neutral" >Item 2</ text >
</ view >