For Developers
Complete guide for developers using FT Design System with CLI commands, npm installation, and setup instructions
Quick Start
1. Install the package
npm install ft-design-system2. Run automated setup
npx ft-design-system setup3. Start using components
import { Button, Input, Badge } from 'ft-design-system';CLI Commands
setup
Set up FT Design System in your existing project
npx ft-design-system setup- • Detects framework automatically
- • Adds CSS import to root file
- • Updates Tailwind config
- • Verifies setup
verify
Verify that FT Design System is properly configured
npx ft-design-system verify- • Checks package installation
- • Verifies CSS import
- • Validates Tailwind config
- • Provides actionable feedback
update
Update Tailwind config after package updates
npx ft-design-system update- • Refreshes Tailwind config
- • Checks CSS import
- • Updates content paths
- • Safe to run multiple times
init
Scaffold a new project with FT Design System
npx ft-design-system init- • Interactive framework selection
- • Pre-configured templates
- • Ready to use immediately
- • Supports Next.js, Vite, CRA
Installation
npm
npm install ft-design-systemyarn
yarn add ft-design-systempnpm
pnpm add ft-design-systemDeveloper Workflow
New Project
mkdir my-project
cd my-project
npx ft-design-system init
npm install
npm run devExisting Project
npm install ft-design-system
npx ft-design-system setup
npx ft-design-system verifyAfter Package Updates
npm update ft-design-system
npx ft-design-system update
npx ft-design-system verifyUsing Components
Basic Import
import { Button, Input, Badge, Table } from 'ft-design-system';Example Usage
MyComponent.tsx
import { Button, Input, Badge } from 'ft-design-system';
function MyComponent() {
return (
<div className="space-y-4">
<Button variant="primary">Click Me</Button>
<Input placeholder="Enter text" />
<Badge variant="success">Active</Badge>
</div>
);
}Quality Gates
Token Audit (before commit)
npm run check:tokensScans for hardcoded px, hex, rgba values that should use design tokens.
Drift Detection (before merging dep updates)
npm run check:driftDetects upstream dependency changes that may affect component specs.
Tips & Best Practices
- Always run
npx ft-design-system verifyafter setup - Run
npm run check:tokensbefore committing UI changes - Use canonical
--spacing-x*tokens (not legacy--x*) - Use TypeScript for better developer experience - full type definitions included
- Import CSS before other styles to ensure proper cascade
- Restart dev server after Tailwind config changes
- Check version compatibility:
npm list ft-design-system