Craft is a lightweight, flexible design system for building responsive layouts in React and handling prose. It provides a set of foundational components that make it easy to create consistent, maintainable layouts while leveraging the power of Tailwind CSS.
Features
Modern Styling: Built with Tailwind CSS and compatible with shadcn/ui
Responsive Design: First-class support for responsive layouts
Type-Safe: Written in TypeScript with strong type inference
Performance: Zero runtime overhead, all styles are compiled
Accessible: Built with WCAG guidelines in mind
Lightweight: No external dependencies beyond Tailwind CSS
Requirements
Node.js 18 or higher (recommended 20+)
Next.js 13 or higher (recommended 15+)
shadcn/ui (for the color system)
Tailwind CSS
TypeScript (recommended)
Quick Start
# Using npm
npx init craft-ds
# Using pnpm (recommended)
pnpx init craft-ds
# Using yarn
yarn create craft-ds
The installer will:
Check your environment and dependencies
Install and configure required packages
Set up the Craft component in your project
Optionally install and configure shadcn/ui
Core Components
Layout
The root component that provides base styling and structure.
import { Layout } from "@/components/craft";
export default function Page() {
return <Layout>{/* Your page content */}</Layout>;
}
Main
The primary content area of your page. Applies typography styles without header spacing.
<Main>
<h1>Welcome</h1>
<p>This content will have typography styles applied.</p>
</Main>
Section
A semantic section container for grouping related content.