A modern, scalable React component library built with Next.js, TypeScript, and Tailwind CSS. This project features a comprehensive design system with Storybook integration for component development, testing, and documentation.
- Next.js 10.1.3 - React framework for production
- TypeScript 4.2.3 - Type-safe JavaScript development
- Tailwind CSS 2.1.1 - Utility-first CSS framework
- Storybook 6.2.5 - Component development environment
- React 17.0.2 - Latest React features and optimizations
- Reusable UI Components - Accordion, Button, Modal, Select, Tabs, and more
- Custom Design System - Unizen-branded color palette and typography
- Accessibility First - WCAG compliant components
- TypeScript Support - Full type safety and IntelliSense
- Storybook Integration - Interactive component playground
- Hot Reload - Instant development feedback
- ESLint & Prettier - Code quality and formatting
- Husky Git Hooks - Pre-commit and pre-push validation
- Chromatic Integration - Visual regression testing
- SVG Support - Optimized SVG handling with @svgr/webpack
- Node.js 14.x or higher
- Yarn package manager
# Clone the repository
git clone https://github.com/anton-karlovskiy/nextjs-storybook-tailwindcss.git
cd nextjs-storybook-tailwindcss
# Install dependencies
yarn install
# Start development server
yarn dev
Command | Description |
---|---|
yarn dev |
Start Next.js development server on port 3000 |
yarn build |
Build production-ready application |
yarn start |
Start production server |
yarn storybook |
Launch Storybook on port 6006 |
yarn build-storybook |
Build static Storybook for deployment |
yarn lint |
Run ESLint for code quality checks |
yarn lint-fix |
Auto-fix ESLint issues |
yarn type-check |
Run TypeScript type checking |
yarn test-all |
Run all quality checks (lint + type-check) |
yarn format |
Format code with Prettier |
yarn chromatic |
Run visual regression tests |
The project uses a custom Unizen color scheme:
- Primary Colors - Java green (#01b1ae) with variants
- Secondary Colors - Vermilion red (#fe4206) with variants
- Neutral Colors - Oxford blue (#374e5e), Regent gray (#82919b)
- Background Colors - White lilac (#f7f7fd), Alabaster (#fbfbfb)
- Primary Text - Oxford blue (#374e5e)
- Secondary Text - Regent gray (#82919b)
- Custom Font Sizes - Extended Tailwind typography scale
- Button Variants - Contained, Outlined, Text
- Button Colors - Default, Primary, Secondary
- Interactive States - Hover, Focus, Disabled, Pending
- UnizenButton - Customizable button with multiple variants
- UnizenInput - Form input component
- UnizenLink - Styled link component
- Accordion - Collapsible content panels
- Modal - Overlay dialogs and popups
- Paper - Elevated content containers
- Tabs - Tabbed navigation interface
- Select - Dropdown selection component
- RangeSlider - Numeric range input
- SwapCard - Trading interface card
- SwapCurrencyField - Currency input field
- Chip - Small status indicators
- List - Structured data lists
Each component includes comprehensive Storybook stories showcasing:
- All component variants and states
- Interactive controls for testing
- Code examples and usage patterns
- Accessibility guidelines
100xcoin-ui/
βββ components/ # Reusable UI components
β βββ Accordion/ # Collapsible panels
β βββ Chip/ # Status indicators
β βββ Modal/ # Overlay dialogs
β βββ Select/ # Dropdown components
β βββ Tabs/ # Tab navigation
β βββ UI/ # Core UI components
βββ pages/ # Next.js pages
β βββ dashboard/ # Dashboard components
β βββ modules/ # Module pages
β βββ trade/ # Trading interface
βββ parts/ # Layout components
β βββ Layout/ # Main layout wrapper
β βββ Sidebar/ # Navigation sidebar
β βββ Logo/ # Brand components
βββ styles/ # Global styles and constants
βββ assets/ # Static assets and icons
βββ stories/ # Storybook stories
βββ utils/ # Utility functions
- Trading Interfaces - Swap cards and currency fields
- Dashboard Components - Balance cards and allocation displays
- Staking Interfaces - Token staking and reward displays
- Design Systems - Consistent UI components
- Prototyping - Rapid interface development
- Documentation - Interactive component showcase
- Admin Dashboards - Data visualization components
- User Interfaces - Form controls and navigation
- Mobile-First Design - Responsive component library
Custom configuration with Unizen brand colors and extended utilities:
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
primary: { /* Unizen Java colors */ },
secondary: { /* Unizen Vermilion colors */ }
}
}
}
}
Optimized webpack configuration for SVG handling:
// next.config.js
module.exports = {
webpack: config => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack']
});
return config;
}
};
Strict type checking with custom type definitions:
// @types/index.d.ts
declare module '*.svg' {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}
# Install Vercel CLI
npm i -g vercel
# Deploy to Vercel
vercel --prod
# Build the project
yarn build
# Deploy to Netlify
# Upload the .next folder to Netlify
FROM node:14-alpine
WORKDIR /app
COPY package*.json ./
RUN yarn install
COPY . .
RUN yarn build
EXPOSE 3000
CMD ["yarn", "start"]
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Run quality checks:
yarn test-all
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Use Prettier for code formatting
- Write comprehensive Storybook stories
- Include accessibility attributes
- Test components across different screen sizes
This project is licensed under the MIT License - see the LICENSE file for details.
- Live Demo - View deployed application
- Storybook - Interactive component library
- Documentation - Component documentation
- Issues - Report bugs or request features
React, Next.js, TypeScript, Tailwind CSS, Storybook, Component Library, UI Components, Design System, DeFi, Trading Interface, Dashboard, Web Development, Frontend, JavaScript, CSS, HTML, Accessibility, Responsive Design, Modern Web Development
Built with β€οΈ using Next.js, TypeScript, and Tailwind CSS