A comprehensive Svelte 5 UI component library with full TypeScript support.
Stylist-svelte is a library of visual components for Svelte 5, built using runes. It is a key part of the infrastructure for the Stylist project, which belongs to the vibe-management conglomerate.
The project's uniqueness lies in the fact that the library is developed by leading LLM models (such as Claude, Codex, Gemini, Qwen), organized according to the vibe-management role model. The author of Stylist-svelte is the collective intelligence Stylist-coder-modelβa combined AI model specially trained to write code for Svelte 5 using runes.
Our mission is to create the world's largest library of visual components for Svelte 5 developers. Every release, including the upcoming version 0.7.0, expands this AI-curated collection of components, patterns, and stories, enabling teams to build consistent user interfaces faster.
Note: This project is part of the Stylist ecosystem. For development and testing, use the dedicated stylist-playground application (in development). For details on the ecosystem architecture and the responsibilities of each project, see the ECOSYSTEM_ARCHITECTURE.md file.
Note: This project is part of the Stylist ecosystem. For development and testing, use the dedicated stylist-playground application (in development). For details on the ecosystem architecture and the responsibilities of each project, see the ECOSYSTEM_ARCHITECTURE.md file.
yarn add stylist-svelte
# or
npm install stylist-svelte
stylist-svelte requires the following peer dependencies:
yarn add svelte@^5.0.0 tailwindcss@^3.4.0 autoprefixer@^10.4.0 @tailwindcss/postcss@^4.1.0
yarn add stylist-svelte svelte@^5.0.0 tailwindcss@^4.0.0 autoprefixer@^10.4.0 @tailwindcss/postcss@^4.1.0
Ensure you have tailwind.config.js and postcss.config.js in your project root. If you don't have them, create them.
tailwind.config.js:
// tailwind.config.js
import { join } from 'path';
/** @type {import('tailwindcss').Config} */
export default {
content: [
'./src/**/*.{html,js,svelte,ts}',
join(require.resolve('stylist-svelte'), '../**/*.{html,js,svelte,ts}')
],
theme: {
extend: {},
},
plugins: [],
};
postcss.config.js:
// postcss.config.js
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
vite.config.ts (for SvelteKit projects):
Ensure your vite.config.ts explicitly enables PostCSS:
import { defineConfig } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite';
export default defineConfig({
plugins: [sveltekit()],
css: {
postcss: {},
},
// ... other configurations
});
Create a src/app.css file (or similar) and import it in your main layout or entry file:
src/app.css:
@tailwind base;
@tailwind components;
@tailwind utilities;
src/app.html (for SvelteKit projects) or main entry point:
<!-- In the <head> section of src/app.html -->
<link rel="stylesheet" href="/src/app.css" />
<script lang="ts">
import { Button, Input, Modal } from 'stylist-svelte';
let showModal = $state(false);
</script>
<Button onclick={() => showModal = true}>
Open Modal
</Button>
{#if showModal}
<Modal
title="Example Modal"
bind:isOpen={showModal}
onClose={() => showModal = false}
>
<Input id="name" label="Name" placeholder="Enter your name" />
</Modal>
{/if}
Create an interactive component playground in minutes:
<!-- src/lib/components/atoms/Button.story.svelte -->
<script lang="ts">
import { Story } from 'stylist-svelte/playground';
import Button from './Button.svelte';
const controls = [
{
name: 'label',
type: 'text',
defaultValue: 'Click me'
},
{
name: 'variant',
type: 'select',
defaultValue: 'primary',
options: ['primary', 'secondary', 'success', 'danger']
},
{
name: 'disabled',
type: 'boolean',
defaultValue: false
}
];
</script>
<Story
id="atoms-button"
title="Button"
component={Button}
category="Atoms"
tags={['action', 'form']}
controls={controls}
>
{#snippet children(props)}
{#snippet label()} {props.label} {/snippet}
<Button variant={props.variant} disabled={props.disabled} content={label} />
{/snippet}
</Story>
Run yarn dev and open the local app β the default route renders <StoryRoot> and automatically picks up all *.story.svelte files from src/lib/components/**.
π Read Playground Documentation
Based on Atomic Design principles, our library is organized into:
Basic building blocks (100+ components):
Composite components (30+ components):
Complex components (10+ components):
This section lists the most important atom components:
| Component | Description |
|---|---|
AccordionIcon |
Icon for accordion elements to indicate expand/collapse state |
Abbr |
Abbreviation with tooltip support |
Alert |
Component for displaying important messages to the user with different variants and close capability |
AspectRatio |
Maintains a specific aspect ratio for content |
Avatar |
Displays a user avatar with status indication and initials support |
Badge |
Small element for displaying status or count with different variants and sizes |
BreadcrumbSeparator |
Separator element in breadcrumb navigation |
Button |
Universal button with various styles, sizes, and states |
Caption |
Caption text with appropriate styling |
Checkbox |
Standard checkbox with label and error support |
Chip |
Compact element for displaying small pieces of information |
CodeBlock |
Block for displaying formatted code with syntax highlighting |
ColorSwatch |
Visual representation of a color |
Container |
Responsive container with consistent padding |
CountBadge |
Badge with a count value |
Counter |
Component for displaying numerical counts |
DefinitionDescription |
Description part of a definition list |
DefinitionTerm |
Term part of a definition list |
Divider |
Horizontal or vertical divider with optional text |
Dot |
Small dot indicator for various purposes |
Em |
Emphasized text with italic style |
Heading |
Heading element with proper semantic and styling |
Highlight |
Component for highlighting text |
Icon |
Displays an icon from an icon set |
Image |
Image component with loading states |
InlineCode |
Displays a small piece of code within text |
Input |
Text input field with label and validation support |
InputAddon |
Addon element for inputs (prefix/suffix) |
Kbd |
Component for displaying keyboard keys in the UI |
Label |
Text label for form elements ensuring accessibility |
Link |
Link with various styling options and sizes |
ListItemMarker |
Marker for list items |
NumberFlow |
Animated display of numeric values |
PageEllipsis |
Ellipsis for pagination |
Paragraph |
Paragraph text with appropriate styling |
PinInputDigit |
Single digit input for PIN entry |
SectionHeading |
Heading for sections |
Separator |
Visual separator between elements |
Small |
Small text with appropriate styling |
Spacer |
Component for adding whitespace |
Spinner |
Loading indicator |
Stack |
Component for stacking elements with consistent spacing |
StatusIndicator |
Status indicator with icon and text |
Strikethrough |
Text with strikethrough styling |
Strong |
Strong emphasis with bold styling |
Subscript |
Subscript text |
Superscript |
Superscript text |
Textarea |
Multi-line text input field |
Text |
Basic text element |
Tag |
Tag for labeling or categorizing |
This section lists the most important molecule components:
| Component | Description |
|---|---|
AttachmentPreview |
Component for previewing attached files |
Breadcrumb |
Navigation element showing user location in hierarchy |
BurgerMenu |
Hamburger menu button for mobile navigation |
ButtonGroup |
Group of related buttons displayed together |
CanvasDrawingSurface |
Surface for canvas-based drawing |
ChatHeader |
Chat header displaying conversation information |
CodeWithCopy |
Component for displaying code with copy capability |
Combobox |
Combobox with text input and dropdown options |
ConfirmDialog |
Confirmation dialog for confirming user actions |
ControlPanel |
Control panel for UI customization |
CopyButton |
Button for copying text to clipboard |
DesignTokens |
Component for visualizing design tokens |
Dialog |
Modal dialog for displaying content |
DropdownMenu |
Dropdown menu for displaying options |
EmptyState |
Component displaying information when no data exists |
ExportPanel |
Panel for exporting data or settings |
FileUpload |
File upload component with drag-and-drop support |
FilterBar |
Bar for filtering and searching content |
FilterPanel |
Panel for configuring filters |
FormSection |
Section for organizing form fields |
GraphNode |
Graph node for visualizing relationships |
InputField |
Input field with additional help text and validation |
MenuItem |
Menu item that can be a link or button |
Modal |
Modal window for displaying content over main interface |
OperationsHistory |
History of performed operations |
Pagination |
Component for navigating between data pages |
QuickAccessButtons |
Set of buttons for quick access to functions |
RadioGroup |
Group of radio buttons for selecting one option |
ResponseViewer |
Component for viewing and formatting responses |
SearchBar |
Search panel with query input |
SearchInput |
Search input field with autocomplete |
StatsCard |
Statistics card displaying key metrics |
SyntaxHighlightedCode |
Component for displaying code with syntax highlighting |
TagInput |
Input component for creating tags |
Toolbar |
Toolbar with group of buttons and controls |
Tooltip |
Tooltip displayed on element hover |
This section lists the most important organism components:
| Component | Description |
|---|---|
Accordion |
Interactive component allowing collapsing and expanding content sections |
Breadcrumbs |
Navigation component showing user path from root level to current page |
ColumnManager |
Tool for managing column visibility and order in tables |
DataTable |
Interactive table with sorting, filtering, and pagination capabilities |
ConfirmDialog |
Confirmation dialog for important user actions |
FolderTree |
Folder structure with expand/collapse capability |
Modal |
Modal window for displaying content over main interface |
Pagination |
Component for navigating between data pages |
Tab |
Tab in tab system containing title and associated content |
TabList |
Tab list organizing visual representation of available tabs |
TabPanel |
Content panel associated with specific tab |
TabPanels |
Container for tab panels managing active panel display |
Tabs |
Tab system component organizing content into separate sections |
Table |
Basic table with styling and structure customization |
TreeViewer |
Viewer for tree structures |
# Install dependencies
yarn install
# Start development server (with Playground)
yarn dev
# Build library
yarn build
# Run tests
yarn test
# Lint
yarn lint
# Format code
yarn format
# Clean build artifacts
yarn clean
The Playground provides an interactive environment to test and develop components:
*.story.svelte files in the components directoryyarn dev to start the Playground serverCmd/Ctrl + K - Search storiesCmd/Ctrl + B - Toggle sidebarCmd/Ctrl + D - Toggle dark modeCmd/Ctrl + / - Show helpEsc - Close modalsThe built-in Playground allows you to test components interactively:
.story.svelte file alongside your componentclass prop for additional stylingsvelte-check warnings for @apply and unused CSS selectorsIf you encounter warnings like Unknown at rule @apply (css) or Unused CSS selector from svelte-check, especially for .dark mode classes, these are often false positives. svelte-check's static analysis might not fully integrate with the PostCSS pipeline or correctly track dynamically applied classes (e.g., for dark mode toggling).
As long as your project builds successfully (yarn build) and styles are applied correctly in the browser, these warnings can generally be ignored. The underlying PostCSS and Tailwind CSS configuration is likely correct.
For detailed documentation, component API references, and examples, visit:
β Production Ready
Total: 141+ production-ready components
The Playground functionality has been separated into a dedicated application: stylist-playground. This application provides:
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
git checkout -b feature/amazing-feature)yarn check and yarn test to ensure everything worksgit commit -m 'Add amazing feature')git push origin feature/amazing-feature)When adding new components:
We use semantic versioning. For the versions available, see the releases on this repository.
MIT License - see LICENSE for details.
Built by the HumansOntology Team as part of the HumansOntology project.
If you encounter any issues, please file them in the GitHub Issues section of the repository.