An open API service indexing awesome lists of open source software.

https://github.com/buikevin/galaxy-design


https://github.com/buikevin/galaxy-design

Last synced: 23 days ago
JSON representation

Awesome Lists containing this project

README

          

# ๐ŸŒŒ Galaxy UI CLI

> Beautiful, accessible components for Vue, React, Angular, **Next.js**, **Nuxt.js**, **React Native**, and **Flutter** with unified design system

[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
[![Vue](https://img.shields.io/badge/Vue-3.5-42b883.svg)](https://vuejs.org/)
[![React](https://img.shields.io/badge/React-18+-61dafb.svg)](https://reactjs.org/)
[![Angular](https://img.shields.io/badge/Angular-20-red.svg)](https://angular.io/)
[![React Native](https://img.shields.io/badge/React_Native-0.73+-61dafb.svg)](https://reactnative.dev/)
[![Flutter](https://img.shields.io/badge/Flutter-3.0+-02569B.svg)](https://flutter.dev/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind-3.4-38bdf8.svg)](https://tailwindcss.com/)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

## โœจ Features

- ๐ŸŽจ **197 Production-Ready Components** - Complete component library across **7 platforms** (41 web per framework + 37 mobile per platform)
- ๐ŸŽฏ **Universal Multi-Platform** - Vue 3, React 18+, Angular 20, **Next.js**, **Nuxt.js**, **React Native**, and **Flutter**
- ๐Ÿ“‹ **Copy-Paste Philosophy** - Own your code, no npm dependencies for components
- โ™ฟ **Accessible** - Built on Radix primitives (WAI-ARIA compliant, keyboard navigation)
- ๐ŸŒ™ **Dark Mode** - First-class dark theme support with CSS variables
- โšก **Modern Stack** - Latest versions with TypeScript strict mode
- ๐ŸŽจ **Tailwind CSS** - Utility-first styling with customization (NativeWind for React Native)
- ๐Ÿ“ฑ **Mobile-First** - Native iOS/Android support via React Native & Flutter
- ๐Ÿš€ **CLI Tool** - Simple init and add commands with auto-detection
- ๐Ÿ”„ **Unified API** - Consistent component API across all mobile platforms

## ๐Ÿš€ Quick Start

### Prerequisites

Before you begin, make sure you have:

- **Node.js 18+** installed
- A **Vue 3**, **React 18+**, **Angular 20**, **Next.js**, or **Nuxt.js** project
- **Tailwind CSS** configured in your project

### Installation

You don't need to install Galaxy UI CLI globally. You can use it directly with your preferred package manager:

```bash
# npm
npx galaxy-design@latest init

# pnpm
pnpm dlx galaxy-design@latest init

# yarn
yarn dlx galaxy-design@latest init

# bun
bunx galaxy-design@latest init
```

### Add Components

After initialization, add components to your project:

```bash
# npm
npx galaxy-design@latest add button

# pnpm
pnpm dlx galaxy-design@latest add button

# yarn
yarn dlx galaxy-design@latest add button

# bun
bunx galaxy-design@latest add button
```

### Add Multiple Components

```bash
# Add multiple components at once
npx galaxy-design@latest add button input dialog

# Or use the shorthand with global installation
npm install -g galaxy-design
galaxy-design add button input select
```

### Tailwind CSS Setup

Galaxy UI requires Tailwind CSS. If you haven't set it up yet:

```bash
# npm
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

# pnpm
pnpm add -D tailwindcss postcss autoprefixer
pnpm dlx tailwindcss init -p

# yarn
yarn add -D tailwindcss postcss autoprefixer
yarn dlx tailwindcss init -p

# bun
bun add -D tailwindcss postcss autoprefixer
bunx tailwindcss init -p
```

### What the Init Command Does

The `galaxy-design init` command will:

1. โœ… Detect your framework (Vue, React, Angular, Next.js, Nuxt.js, React Native, or Flutter)
2. โœ… Create `components.json` configuration file
3. โœ… Set up the `components/ui` directory (or platform-specific paths)
4. โœ… Configure path aliases (`@/components`, `@/lib/utils`)
5. โœ… Install required dependencies (Radix primitives, NativeWind for RN, etc.)
6. โœ… Set up Tailwind CSS integration with design tokens

## ๐Ÿ“ฆ Components (41)

All components work identically across **Vue 3**, **React 18+**, **Angular 20**, **Next.js**, and **Nuxt.js** with full Radix primitives integration:

### ๐Ÿ“ Form Components (12)
- **Button** - Clickable button with multiple variants and sizes
- **Input** - Text input field
- **Checkbox** - Checkbox for binary choices
- **Radio Group** - Radio button group for exclusive choices
- **Select** - Dropdown selection menu with full accessibility
- **Slider** - Range slider input with min/max/step
- **Switch** - Toggle switch with smooth animation
- **Textarea** - Multi-line text input
- **Label** - Accessible form labels with proper associations
- **Calendar** - Date picker calendar
- **Calendar Range** - Date range picker
- **Tags Input** - Multi-value tag input

### ๐Ÿ“ Layout Components (8)
- **Separator** - Horizontal/vertical visual divider
- **Accordion** - Expandable content sections with animations
- **Collapsible** - Single collapsible section
- **Tabs** - Tabbed interface with data-[state] styling
- **Aspect Ratio** - Maintain aspect ratio for media content
- **Resizable** - Resizable panel groups with keyboard support
- **Sheet** - Slide-over panel from screen edge
- **Toolbar** - Container for grouping controls

### ๐Ÿงญ Navigation Components (6)
- **Navigation Menu** - Complex site navigation with indicators
- **Menubar** - Application menu bar (File, Edit, etc.)
- **Context Menu** - Right-click contextual menu
- **Dropdown Menu** - Click-triggered dropdown menu
- **Pagination** - Page navigation with numbers
- **Command** - Command palette for keyboard navigation

### ๐ŸŽฎ Interactive Components (2)
- **Toggle** - Two-state toggle button
- **Toggle Group** - Set of toggle buttons for single or multiple selection

### ๐Ÿ”ฒ Overlay Components (5)
- **Dialog** - Modal dialog with overlay and portal
- **Alert Dialog** - Confirmation dialog with focus trap
- **Popover** - Floating content with smart positioning
- **Tooltip** - Hover tooltip with portal support
- **Hover Card** - Rich hover card with preview content

### ๐Ÿ“Š Data Display Components (7)
- **Avatar** - User avatar with automatic fallback
- **Progress** - Progress bar indicator
- **Table** - Responsive data table
- **Kbd** - Keyboard key display
- **Typography** - Text formatting components
- **Empty** - Empty state placeholder
- **Skeleton** - Loading placeholder

### ๐Ÿ”ง Utility Components (1)
- **Scroll Area** - Custom styled scrollable area

> **Note**: All components built with Radix primitives have full WAI-ARIA support, keyboard navigation, and screen reader compatibility. Components are production-ready and fully typed with TypeScript.

## ๐Ÿ’ก Philosophy

Galaxy UI CLI follows the **copy-paste component** approach:

- โœ… Components are **copied directly** into your project
- โœ… You have **full ownership** of the code
- โœ… **Complete control** to customize as needed
- โœ… **No version conflicts** or dependency issues
- โœ… Built with **Tailwind CSS** + **Radix primitives**

## ๐ŸŽจ Design System

Built on industry-standard accessible design systems:

- **Radix UI** (React) - Unstyled, accessible components for React
- **Radix Vue** (Vue 3) - Vue port of Radix UI primitives
- **Radix NG** (Angular) - Angular primitives with full WAI-ARIA support
- **shadcn/ui** inspired - Copy-paste philosophy and beautiful design
- **Tailwind CSS 3.4** - Utility-first styling with CSS variables

### Radix Primitives Integration

Components built with Radix primitives include:

- โœ… **Full WAI-ARIA compliance** - Automatic ARIA attributes
- โœ… **Keyboard navigation** - Tab, Arrow keys, Enter, Escape support
- โœ… **Screen reader support** - Live regions and announcements
- โœ… **Focus management** - Automatic focus trap for modals
- โœ… **Portal support** - Floating elements render in document body
- โœ… **Collision detection** - Smart positioning for overlays
- โœ… **OnPush strategy** - Optimized change detection

## ๐Ÿ“š Documentation

Full documentation available at: **https://galaxy-design.vercel.app**

- [Getting Started](https://galaxy-design.vercel.app/guide/introduction)
- [Installation](https://galaxy-design.vercel.app/guide/installation)
- [Components](https://galaxy-design.vercel.app/components/overview)
- [CLI Usage](https://galaxy-design.vercel.app/guide/cli-usage)

## ๐Ÿ“– Usage Examples

### Vue 3

```vue

import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { ref } from 'vue'

const email = ref('')



Submit

```

### React

```tsx
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { useState } from 'react'

export default function Example() {
const [email, setEmail] = useState('')

return (


setEmail(e.target.value)}
placeholder="Email"
/>
Submit

)
}
```

### Angular

```typescript
import { Component } from '@angular/core';
import { ButtonComponent } from '@/components/ui/button';
import { InputComponent } from '@/components/ui/input';

@Component({
selector: 'app-example',
standalone: true,
imports: [ButtonComponent, InputComponent],
template: `



Submit

`
})
export class ExampleComponent {
email = '';
}
```

## ๐Ÿ› ๏ธ Development

This is an Nx monorepo managed with Bun.

### Development Prerequisites

- Node.js 18+
- Bun (recommended) or npm/pnpm/yarn

### Development Setup

```bash
# Clone repository
git clone https://github.com/buikevin/galaxy-design
cd galaxy-design

# Install dependencies
bun install

# Build all packages
bun nx run-many -t build

# Build specific package
bun nx build cli
bun nx build vue
bun nx build react
bun nx build angular

# Run documentation site
cd docs
bun run dev
```

## ๐Ÿ“ฆ Packages

| Package | Description | Status |
|---------|-------------|--------|
| `galaxy-design` | CLI tool (init, add commands) | โœ… Complete |
| Component Templates | 41 component templates (Vue, React, Angular) | โœ… Complete |

## ๐Ÿ—บ๏ธ Roadmap

### โœ… Phase 1: Foundation (Complete)
- โœ… Nx monorepo setup
- โœ… Package structure
- โœ… Multi-framework architecture

### โœ… Phase 2: CLI Tool (Complete)
- โœ… `galaxy-design init` command
- โœ… `galaxy-design add` command
- โœ… Framework auto-detection
- โœ… Package manager detection

### โœ… Phase 3: Components (Complete)
- โœ… 41 web components + 35 mobile components (22 RN, 13 Flutter)
- โœ… Vue 3 implementations
- โœ… React 18+ implementations
- โœ… Angular 20 implementations
- โœ… Full TypeScript support
- โœ… Radix primitives integration

### โœ… Phase 4: Documentation (Complete)
- โœ… VitePress documentation site
- โœ… Bilingual support (English/Vietnamese)
- โœ… Component documentation
- โœ… Usage examples

### ๐Ÿšง Phase 5: Testing (In Progress)
- โธ๏ธ Unit tests for all components
- โธ๏ธ Integration tests
- โธ๏ธ E2E tests

### โœ… Phase 6: Publishing (Complete)
- โœ… npm package publishing preparation
- โœ… Documentation site deployed (Vercel)
- โœ… Build automation with prepublishOnly

## ๐Ÿ“Š Project Stats

- **Components**: 197 total (41 per web framework + 37 per mobile platform)
- **Platforms**: 7 (Vue 3, React 18+, Angular 20, Next.js, Nuxt.js, React Native, Flutter)
- **Total Implementations**: 197 unique component implementations (Next.js uses React templates, Nuxt.js uses Vue templates)
- **Radix Integration**: Full coverage with Radix primitives for web
- Vue: Radix Vue primitives
- React: Radix UI primitives
- Angular: Radix NG primitives (@radix-ng/primitives)
- **Mobile Frameworks**:
- React Native: 37 components with NativeWind v4
- Flutter: 37 components with Material Design 3
- **Lines of Code**: ~20,000+ across all packages
- **Documentation**: 82+ pages (41 EN + 41 VI) in VitePress + mobile guides
- **CLI**: โœ… Fully functional (init & add commands) with mobile support
- **Build Status**: โœ… All components compile successfully
- **Deployment**: โœ… Docs deployed at https://galaxy-design.vercel.app
- **Status**: Production-ready & ready for npm publish

## ๐Ÿค Contributing

Contributions are welcome!

### How to Contribute

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request

## ๐Ÿ’ก Inspiration

- **[shadcn/ui](https://ui.shadcn.com/)** - Copy-paste philosophy and design
- **[shadcn-vue](https://www.shadcn-vue.com/)** - Vue implementation
- **[Radix UI](https://www.radix-ui.com/)** - Accessible primitives
- **[Radix Vue](https://www.radix-vue.com/)** - Vue primitives
- **[Radix NG](https://github.com/radix-ng/primitives)** - Angular primitives

## ๐Ÿ“„ License

MIT ยฉ 2025 Bรนi Trแปng Hiแบฟu (kevinbui)

## ๐Ÿ‘ค Author

**Bรนi Trแปng Hiแบฟu (kevinbui)**
- GitHub: [@buikevin](https://github.com/buikevin)
- Email: kevinbui210191@gmail.com

## ๐Ÿ”— Links

- **Repository**: https://github.com/buikevin/galaxy-design
- **Documentation**: https://galaxy-design.vercel.app
- **npm Package**: https://www.npmjs.com/package/galaxy-design (Coming Soon)
- **Changelog**: See [CHANGELOG.md](CHANGELOG.md)

---

**Built with โค๏ธ using Vue, React, Angular, TypeScript, and Tailwind CSS**