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-system

2. Run automated setup

npx ft-design-system setup

3. 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-system

yarn

yarn add ft-design-system

pnpm

pnpm add ft-design-system
Developer Workflow

New Project

mkdir my-project
cd my-project
npx ft-design-system init
npm install
npm run dev

Existing Project

npm install ft-design-system
npx ft-design-system setup
npx ft-design-system verify

After Package Updates

npm update ft-design-system
npx ft-design-system update
npx ft-design-system verify
Using 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:tokens

Scans for hardcoded px, hex, rgba values that should use design tokens.

Drift Detection (before merging dep updates)

npm run check:drift

Detects upstream dependency changes that may affect component specs.

Tips & Best Practices

  • Always run npx ft-design-system verify after setup
  • Run npm run check:tokens before 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