1.0.0 • Published 10 months ago

awesome-ui-cli v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Awesome UI Library

A modern, accessible UI component library with CLI tools for easy component management and installation.

šŸš€ Features

  • šŸ“¦ Ready-to-use React components
  • šŸŽØ Tailwind CSS for styling
  • šŸ› ļø CLI tool for component management
  • šŸ“š Storybook documentation
  • šŸŽÆ TypeScript support
  • šŸŽØ Customizable components with Class Variance Authority

šŸ“‹ Prerequisites

  • Node.js >= 18.0.0
  • npm

šŸ”§ Installation

# Install the CLI tool globally
npm install -g awesome-ui-cli

# Or use it directly with npx
npx awesome-ui-cli

šŸŽÆ Usage

Installing Components

# Install a specific component
awesome-ui-cli add button

Available Scripts

# Start the development server
npm run start

# Build the library
npm run build

# Run Storybook
npm run storybook

# Build Storybook
npm run build-storybook

šŸ¤ Contributing

We love your input! We want to make contributing to Awesome UI as easy and transparent as possible.

Project Structure

src/
ā”œā”€ā”€ templates/           # Component templates for CLI
│   ā”œā”€ā”€ components/     # Component template files
ā”œā”€ā”€ stories/           # Storybook stories
└── Cli/              # CLI implementation

Adding a New Component

  1. Create Component Template Add your component template files in src/templates/components/[ComponentName]/:

    src/templates/components/[ComponentName]/
    ā”œā”€ā”€ index.ts              # Main export file
    └── [ComponentName].tsx   # Component implementation
  2. Create Storybook Story Add your story in src/stories/:

    src/stories/
    └── [ComponentName].stories.tsx  # Storybook story
  3. Component Implementation Requirements

    • Use TypeScript for type safety
    • Implement proper accessibility features
    • Use Tailwind CSS for styling
    • Use Class Variance Authority for variants
    • Include proper JSDoc documentation
    • Add proper prop types and interfaces
  4. Register Component in CLI Add your component to the CLI registry in src/Cli/registry.ts:

    export const componentRegistry = {
      button: {
        name: "Button",
        dependencies: ["class-variance-authority"],
        templatePath: "src/templates/components/Button",
        files: ["Button.tsx", "index.ts"],
      },
      // Add your new component here
    };
  5. Testing Requirements

    • Test all variants and props
    • Ensure responsive behavior
  6. Documentation

    • Include usage examples
    • Document all props and variants

Pull Request Process

  1. clone the repository
  2. Create a new branch (git checkout -b feature/component-name)
  3. Make your changes
  4. Update documentation
  5. Submit a pull request

šŸ“ License

MIT License - see the LICENSE file for details

šŸ‘„ Authors

  • Shehab Mohsen Mahmoud - GitHub

šŸ™ Acknowledgments