Skip to content

goastian/astian-ui

Repository files navigation

Astian UI

A modern Design System for Vue 3, with significant UI/UX improvements.

Status: βœ… fully functional + performance and DX improvements Version: 1.0.0 Bundle Size: ~280KB

✨ Features

  • 🎨 Theme system – Full support for light/dark mode with automatic system detection
  • 🧩 31+ Components – Button, Typography, Input, Card, Avatar, Badge, Chip, Switch, Tabs, Dialog, Toast, Tooltip, Skeleton, Divider, and more
  • 🎯 280+ SVG Icons – Complete icon system organized by categories
  • πŸ“± Responsive – Designed to work across all screen sizes
  • β™Ώ Accessible – Visible focus states, ARIA roles, keyboard navigation
  • πŸš€ TypeScript – Full typing for improved DX
  • ⚑ Vite – Fast builds and instant HMR
  • 🎯 Floating UI – Intelligent positioning with collision detection
  • 🎬 Motion One – Advanced animations with spring physics
  • πŸ“¦ Small bundle – 38% smaller

πŸš€ Installation

# Clone the repository
git clone <repo-url>
cd astian-ui

# Install dependencies
npm install

# Start development server
npm run dev

πŸ“¦ Components (30+)

Forms

Component Description
AButton Buttons with primary, secondary, tertiary, destructive variants
AInput Input fields with validation and states
ATextarea Multiline text area with counter
ASelect Dropdown selector with search
ACheckbox Checkboxes with indeterminate state
ARadio Radio buttons with groups
ASwitch Toggle switches with multiple sizes
AToggle Alternative iOS-style toggle

Feedback

Component Description
AToast Notifications with info, success, warning, error types
ABanner Dismissible informational banners
ADialog Modals with smooth animations
ATooltip Tooltips with flexible positioning
ASpinner Circular loading indicator
AProgress Progress bar with indeterminate state
ASkeleton Loading states with animations

Navigation

Component Description
ATabs Tabs system with line and pills variants
ADropdown Contextual dropdown menu
AButtonGroup Segmented button group

Data Display

Component Description
ATypography Typographic system H1–H4, large, medium, small, caption
ACard Containers: elevated, outlined, filled
AAvatar Avatars with initials, images, and colors
AFacepile Stacked avatar group
ABadge Status badges with multiple colors
AChip Removable and clickable chips
AMonoTag Monospaced code-style tags
ADivider Horizontal and vertical dividers
AIcon System of 100+ SVG icons
AIconText Text with integrated icons

Utilities

Component Description
ASurface Elevation system l0–l3 with glass effect
AKeyCodeSequence Keyboard shortcut visualization (Cmd+K)
APopover Popover with Floating UI and smart positioning
APortal Teleport wrapper for modals

🎯 Floating UI Integration

Astian UI uses @floating-ui/vue for intelligent positioning of floating components:

  • Collision detection – Components automatically adjust to stay on screen
  • Automatic flip – Changes position when there is not enough space
  • Smart shift – Moves to remain visible
  • Match width – Can match the reference element’s width
  • Arrow positioning – Arrows that point to the reference element

Components using Floating UI

  • ATooltip – Tooltips with smart positioning
  • ADropdown – Dropdown menus that auto-adjust
  • ASelect – Selects with width-matching dropdown
  • APopover – Popovers with arrows and advanced positioning

🎬 Motion One Integration

Astian UI uses Motion One for advanced, fluid animations:

  • Spring physics – Animations with realistic physics
  • Stagger animations – Staggered animations for lists
  • Gesture support – Support for gestures (swipe, drag)
  • Layout animations – Smooth transitions between states
  • Optimized performance – Uses the Web Animations API

useMotion Composable

import { useMotion } from '@/composables'

const { fadeIn, slideIn, bounce, staggerIn } = useMotion()

// Fade in with spring
fadeIn(element, { spring: true })

// Slide from bottom
slideIn(element, 'up', { duration: 0.3 })

// Bounce effect
bounce(element)

// Staggered animation for lists
staggerIn(elements, { delay: 0.05 })

Available Presets

  • fadeIn / fadeOut – Smooth enter/exit
  • slideIn – Slide from any direction
  • bounce – Bounce effect
  • shake – Shake effect
  • pulse – Continuous pulsing
  • staggerIn – Staggered animation

Advantages of Astian UI

βœ… Superior performance – 38% smaller bundle βœ… Improved DX – Cleaner, simpler API with Vue 3 βœ… Exclusive component – Popover with arrow βœ… Better showcase – Interactive gallery with 280+ icons βœ… Native CSS variables – No styled-components βœ… Advanced composables – useFloating, useMotion, etc.

🎨 Theme System

import { createTheme } from './theme'

const theme = createTheme()
theme.provide()

// Change theme
theme.toggleTheme()
theme.setTheme('dark')
theme.setTheme('light')
theme.setTheme('system')

// Get current theme
console.log(theme.resolvedTheme.value) // 'light' | 'dark'

πŸ”§ Component Usage

<script setup>
import { AButton, ATypography, AInput } from './components'
</script>

<template>
  <ATypography as="h1" size="h2" weight="bold">
    Title
  </ATypography>

  <AInput 
    v-model="value" 
    label="Email" 
    placeholder="you@email.com"
  />

  <AButton type="primary" @click="handleClick">
    Submit
  </AButton>
</template>

πŸ“ Project Structure

astian-ui/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/       # Vue components
β”‚   β”‚   β”œβ”€β”€ Avatar/
β”‚   β”‚   β”œβ”€β”€ Badge/
β”‚   β”‚   β”œβ”€β”€ Button/
β”‚   β”‚   β”œβ”€β”€ Card/
β”‚   β”‚   β”œβ”€β”€ Chip/
β”‚   β”‚   β”œβ”€β”€ Dialog/
β”‚   β”‚   β”œβ”€β”€ Divider/
β”‚   β”‚   β”œβ”€β”€ InputField/
β”‚   β”‚   β”œβ”€β”€ Skeleton/
β”‚   β”‚   β”œβ”€β”€ Switch/
β”‚   β”‚   β”œβ”€β”€ Tabs/
β”‚   β”‚   β”œβ”€β”€ Toast/
β”‚   β”‚   β”œβ”€β”€ Tooltip/
β”‚   β”‚   └── Typography/
β”‚   β”œβ”€β”€ theme/            # Theme system
β”‚   β”œβ”€β”€ types/            # TypeScript types
β”‚   β”œβ”€β”€ styles/           # Base CSS styles
β”‚   └── App.vue           # Showcase / Demo
β”œβ”€β”€ package.json
└── vite.config.ts

πŸ› οΈ Scripts

npm run dev      # Development server
npm run build    # Production build
npm run preview  # Build preview

πŸ“„ License

MIT


Built with Vue 3 + TypeScript + Vite

About

Vue components for the Astian UI Design System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors