Skip to content

dev-1603/CelestialUI-Vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 CelestialUI Vue

A comprehensive Vue 3 component library with multi-framework styling support, inspired by shadcn/ui and Aceternity UI.

npm version Vue 3 TypeScript License: MIT

✨ Features

  • 🎨 Multi-Framework Styling: Support for Tailwind CSS, SCSS, Material Design, and pure CSS
  • πŸ”§ Vue 3 & Nuxt 3/4 Compatible: Full compatibility with Vue 3 and Nuxt 3/4
  • 🎯 TypeScript First: Comprehensive type definitions included
  • β™Ώ Accessibility Focused: WCAG compliant components with keyboard navigation
  • 🎭 Universal Icon System: Support for FontAwesome, Material Icons, Heroicons, Lucide, and custom SVGs
  • πŸ“± Responsive Design: Mobile-first approach with responsive utilities
  • πŸŒ“ Dark Mode: Built-in theme switching capabilities
  • πŸ§ͺ Well Tested: Comprehensive unit, integration, and E2E tests
  • πŸ“– Storybook Integration: Interactive component documentation
  • πŸ”₯ Tree Shakeable: Optimized bundle sizes with selective imports

πŸš€ Quick Start

Installation

# npm
npm install @celestialui/vue

# yarn
yarn add @celestialui/vue

# pnpm
pnpm add @celestialui/vue

Basic Usage

// main.ts
import { createApp } from 'vue'
import CelestialUI from '@celestialui/vue'
import '@celestialui/vue/style.css'

const app = createApp(App)

app.use(CelestialUI, {
  theme: {
    framework: 'tailwind', // 'tailwind' | 'scss' | 'material' | 'css'
    mode: 'light' // 'light' | 'dark' | 'auto'
  },
  icons: {
    provider: 'fontawesome', // 'fontawesome' | 'material' | 'heroicons' | 'lucide'
    format: 'font' // 'font' | 'svg' | 'img'
  }
})

app.mount('#app')

Component Usage

<template>
  <div>
    <!-- Buttons -->
    <CButton variant="primary" size="lg" left-icon="star">
      Primary Button
    </CButton>
    
    <!-- Input -->
    <CInput
      v-model="email"
      label="Email Address"
      type="email"
      prefix-icon="envelope"
      clearable
    />
    
    <!-- Card -->
    <CCard title="Card Title" subtitle="Card subtitle" hoverable>
      <p>Card content goes here...</p>
      <template #footer>
        <CButton size="sm">Action</CButton>
      </template>
    </CCard>
    
    <!-- Modal -->
    <CModal v-model="showModal" title="Modal Title">
      <p>Modal content...</p>
      <template #footer>
        <CButton @click="showModal = false">Close</CButton>
      </template>
    </CModal>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const email = ref('')
const showModal = ref(false)
</script>

🎨 Styling Frameworks

Tailwind CSS

app.use(CelestialUI, {
  theme: {
    framework: 'tailwind',
    mode: 'light'
  }
})

SCSS

app.use(CelestialUI, {
  theme: {
    framework: 'scss',
    mode: 'light'
  }
})

Material Design

app.use(CelestialUI, {
  theme: {
    framework: 'material',
    mode: 'light'
  }
})

Pure CSS

app.use(CelestialUI, {
  theme: {
    framework: 'css',
    mode: 'light',
    customProperties: {
      '--cui-primary': '#0ea5e9',
      '--cui-secondary': '#64748b'
    }
  }
})

πŸ”§ Nuxt 3/4 Integration

Installation

npm install @celestialui/vue

Nuxt Plugin

// plugins/celestialui.client.ts
import CelestialUI from '@celestialui/vue'
import '@celestialui/vue/style.css'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(CelestialUI, {
    theme: {
      framework: 'tailwind',
      mode: 'auto'
    },
    icons: {
      provider: 'fontawesome',
      format: 'font'
    }
  })
})

Nuxt Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  css: ['@celestialui/vue/style.css'],
  
  components: [
    {
      path: '@celestialui/vue/components',
      global: true
    }
  ]
})

🧩 Components

Core Components

  • CButton - Versatile button with multiple variants
  • CInput - Enhanced input with validation and icons
  • CCard - Flexible card component with slots
  • CIcon - Universal icon component
  • CModal - Accessible modal dialog
  • CToast - Toast notification system

Layout Components

  • CContainer - Responsive container
  • CGrid - CSS Grid layout
  • CStack - Flexbox stack layout

Form Components

  • CCheckbox - Styled checkbox input
  • CRadio - Radio button group
  • CSelect - Enhanced select dropdown
  • CTextarea - Multi-line text input
  • CSwitch - Toggle switch component

Feedback Components

  • CAlert - Alert messages
  • CProgress - Progress indicators
  • CSpinner - Loading spinners
  • CBadge - Status badges

🎭 Icon System

CelestialUI supports multiple icon providers:

FontAwesome

<CIcon name="star" provider="fontawesome" />
<CIcon name="heart" provider="fontawesome" spin />

Material Icons

<CIcon name="favorite" provider="material" />
<CIcon name="star" provider="material" />

Heroicons

<CIcon name="star" provider="heroicons" />
<CIcon name="heart" provider="heroicons" />

Custom Icons

app.use(CelestialUI, {
  icons: {
    provider: 'custom',
    customIcons: {
      'my-icon': '/path/to/icon.svg',
      'logo': MyLogoComponent
    }
  }
})

πŸŒ“ Theme System

Using Composables

<script setup lang="ts">
import { useTheme } from '@celestialui/vue'

const { isDark, toggleTheme, setTheme } = useTheme()

// Toggle between light and dark
const handleToggle = () => {
  toggleTheme()
}

// Set specific theme
const setLightTheme = () => {
  setTheme({
    mode: 'light',
    framework: 'tailwind'
  })
}
</script>

Custom Theme Tokens

app.use(CelestialUI, {
  theme: {
    framework: 'css',
    tokens: {
      colors: {
        primary: {
          500: '#your-primary-color'
        }
      },
      spacing: {
        custom: '2.5rem'
      }
    }
  }
})

πŸ§ͺ Testing

Unit Tests

# Run unit tests
npm run test:unit

# Run with coverage
npm run test:coverage

E2E Tests

# Run E2E tests
npm run test:e2e

# Run E2E tests in development
npm run test:e2e:dev

πŸ“– Development

Setup

# Clone the repository
git clone https://github.com/your-username/celestialui-vue.git

# Install dependencies
cd celestialui-vue
npm install

# Start development server
npm run dev

# Start Storybook
npm run storybook

Building

# Build library
npm run build-lib

# Build demo
npm run build-demo

# Build both
npm run build

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


Made with ❀️ by the CelestialUI team

About

A high-performance Design System & Component Engine focused on accessibility and type-safety. Features WCAG-compliant patterns, a universal icon system, and tree-shakeable builds. Built for Nuxt/Vue with multi-theme styling and interactive Storybook docs. 🎨✨

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors