UI Components
ElyOS provides a rich UI component library based on shadcn-svelte components, Lucide icons, Tailwind CSS 4 styles, and custom components. These components ensure a consistent look and behavior throughout the system.
Technology Stack
Section titled “Technology Stack”- shadcn-svelte — Headless UI components (based on bits-ui)
- Lucide Svelte — Icon set (~1400 icons)
- Tailwind CSS 4 — Utility-first CSS framework (Vite plugin)
- Tanstack Table — Data table logic
- svelte-sonner — Toast notifications
Component Categories
Section titled “Component Categories”Basic Components
Section titled “Basic Components”The fundamental UI building blocks you can use in any app.
- Button — Buttons with various variants
- Input — Text input fields
- Select — Dropdown menus
- Checkbox — Checkboxes
- Switch — Toggle switches
- Label — Labels
- Badge — Status labels
- Separator — Divider lines
Dialog Components
Section titled “Dialog Components”Modal windows and dialog panels for simple and complex use cases.
- ConfirmDialog — Confirmation dialog (delete, etc.)
- CustomDialog — Custom content dialog
- AlertDialog — Alert dialog
- Drawer — Side panel
Notifications
Section titled “Notifications”Toast messages and notification system.
- Toast — Transient notifications (svelte-sonner)
- NotificationStore — Notification system
- NotificationList — Notification list
DataTable
Section titled “DataTable”Server-side data table component with sorting, filtering and pagination.
- DataTable — Main table component
- Actions Column — Action column (primary + dropdown)
- Column Header — Sortable column header
- Faceted Filter — Filter component
Layout Components
Section titled “Layout Components”Components for structuring content.
- Card — Card component
- Tabs — Tab component
- Separator — Divider lines
Navigation
Section titled “Navigation”Navigation components and menus.
- Dropdown Menu — Dropdown menu
- Context Menu — Right-click menu
- Command — Command palette
- Popover — Popup panel (Combobox pattern)
Lucide icon set usage.
- Icon importing
- Common icons
- Size and style customization
Tailwind CSS
Section titled “Tailwind CSS”Utility classes and styling conventions.
- Common utility classes
- Color palette
- Responsive design
- Dark mode
Quick Start
Section titled “Quick Start”Component Import
Section titled “Component Import”<script> import { Button } from '$lib/components/ui/button'; import { Input } from '$lib/components/ui/input'; import * as Dialog from '$lib/components/ui/dialog';</script>Icon Usage
Section titled “Icon Usage”<script> import User from 'lucide-svelte/icons/user'; import Settings from 'lucide-svelte/icons/settings';</script>
<User size={24} /><Settings size={16} class="text-primary" />Toast Message
Section titled “Toast Message”<script> import { toast } from 'svelte-sonner';</script>
<button onclick={() => toast.success('Saved successfully!')}> Save</button>Best Practices
Section titled “Best Practices”- Use shadcn components — Don’t build your own buttons, inputs
- Toast messages — Give feedback after every operation
- ConfirmDialog for deletion — Always ask for confirmation on dangerous operations
- DataTable server-side — Use server-side pagination for large datasets
- Icons consistently — Only use Lucide icons
- Tailwind utilities — Prefer them over custom CSS
- Responsive design — Use responsive classes (
sm:,md:,lg:) - Accessibility — Use
Labelcomponent with every input - Loading state — Display loading state
- Semantic colors —
destructivefor deletion,primaryfor primary action
Next Steps
Section titled “Next Steps”Choose a component category from the left menu for detailed documentation and code examples.
External Documentation
Section titled “External Documentation”- shadcn-svelte — Component library
- Lucide icons — Full icon list
- Tailwind CSS — CSS framework
- Tanstack Table — Table logic
- svelte-sonner — Toast component