Documentation

Everything you need to know about using TonuComponent

React Setup Guide

Project Structure

We recommend the following structure for your React project:

src/
├── components/
│   ├── ui/           # TonuComponent components
│   ├── layout/       # Layout components
│   └── features/     # Feature-specific components
├── styles/
│   └── globals.css   # Global styles
└── App.tsx

Tailwind Configuration

Add this to your `src/styles/globals.css`:

css
@tailwind base;
@tailwind components;
@tailwind utilities;

Using Components

Example of using a button component:

tsx
import { PrimaryButton } from './components/ui/button';

function App() {
  return (
    <div className="p-8">
      <PrimaryButton onClick={() => alert('Clicked!')}>
        Click Me
      </PrimaryButton>
    </div>
  );
}

export default App;

Tips for React

  • Use functional components with hooks
  • Leverage TypeScript for better DX
  • Keep components small and focused
  • Use proper prop types