skeleton
Skeleton UI component library for Svelte applications. Built on Tailwind CSS with comprehensive theming, design tokens, and accessible components. Expert patterns for layouts, forms, data display, and navigation. USE WHEN: user mentions "Skeleton UI", "Skeleton Svelte", asks about "Svelte component library", "Tailwind + Svelte", "Skeleton components", "Svelte design system", "Skeleton theming" DO NOT USE FOR: Other UI libraries - use respective skills (Shadcn, DaisyUI, etc.)
What this skill does
# Skeleton UI Skill
> **Full Reference**: See [theming.md](theming.md) for Design Tokens, Custom Themes, Theme Switching, Data Display (Cards, Tables, Avatars), Feedback (Toast, Modal), Navigation (Tabs, Stepper, Pagination), and Stores Setup.
## When NOT to Use This Skill
- **React/Vue/Angular projects** - Skeleton is Svelte-only
- **Plain HTML/CSS** - Skeleton requires Svelte and Tailwind CSS
- **Headless UI needs** - Skeleton provides styled components
- **SvelteKit not used** - Skeleton is optimized for SvelteKit
## Installation
```bash
# Create new SvelteKit project
npx sv create my-app
cd my-app
# Add Skeleton
npx @skeletonlabs/skeleton-cli add skeleton
# Or manual installation
npm install @skeletonlabs/skeleton @skeletonlabs/tw-plugin
npm install -D tailwindcss postcss autoprefixer
```
## Configuration
### tailwind.config.js
```javascript
import { skeleton } from '@skeletonlabs/tw-plugin';
export default {
darkMode: 'class',
content: [
'./src/**/*.{html,js,svelte,ts}',
require.resolve('@skeletonlabs/skeleton').replace(/\/index\.js$/, '/**/*.{html,js,svelte,ts}')
],
plugins: [
skeleton({
themes: {
preset: ['skeleton', 'modern', 'crimson'],
},
}),
],
};
```
### app.postcss
```css
@import '@skeletonlabs/skeleton/styles/skeleton.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
```
### app.html
```html
<body data-theme="skeleton" class="h-full">
%sveltekit.body%
</body>
```
---
## Layout Components
### AppShell
```svelte
<script>
import { AppShell, AppBar, AppRail, AppRailTile } from '@skeletonlabs/skeleton';
let { children } = $props();
</script>
<AppShell>
<svelte:fragment slot="header">
<AppBar>
<svelte:fragment slot="lead">
<strong>My App</strong>
</svelte:fragment>
<svelte:fragment slot="trail">
<button class="btn variant-filled-primary">Login</button>
</svelte:fragment>
</AppBar>
</svelte:fragment>
<svelte:fragment slot="sidebarLeft">
<AppRail>
<AppRailTile label="Home">๐ </AppRailTile>
<AppRailTile label="Settings">โ๏ธ</AppRailTile>
</AppRail>
</svelte:fragment>
{@render children()}
</AppShell>
```
---
## Form Components
### Buttons
```svelte
<!-- Variants -->
<button class="btn variant-filled-primary">Primary</button>
<button class="btn variant-ghost-primary">Ghost</button>
<button class="btn variant-soft-primary">Soft</button>
<button class="btn variant-ringed-primary">Ringed</button>
<!-- Sizes -->
<button class="btn btn-sm">Small</button>
<button class="btn btn-lg">Large</button>
<!-- Icon button -->
<button class="btn-icon variant-filled-primary">๐</button>
```
### Inputs
```svelte
<label class="label">
<span>Email</span>
<input class="input" type="email" placeholder="Enter email" />
</label>
<label class="label">
<span>Message</span>
<textarea class="textarea" rows="4"></textarea>
</label>
<label class="label">
<span>Country</span>
<select class="select">
<option value="us">United States</option>
<option value="uk">United Kingdom</option>
</select>
</label>
```
### Checkbox, Radio & Toggle
```svelte
<label class="flex items-center space-x-2">
<input class="checkbox" type="checkbox" />
<span>Accept terms</span>
</label>
<label class="flex items-center space-x-2">
<input class="radio" type="radio" name="plan" value="pro" />
<span>Pro</span>
</label>
<label class="flex items-center space-x-2">
<input class="toggle" type="checkbox" />
<span>Dark mode</span>
</label>
```
---
## Data Display
### Cards
```svelte
<div class="card p-4">
<header class="card-header">
<h3 class="h3">Card Title</h3>
</header>
<section class="p-4">Card content</section>
<footer class="card-footer">
<button class="btn variant-filled-primary">Action</button>
</footer>
</div>
<!-- Interactive card -->
<a href="/item/1" class="card card-hover p-4">Clickable</a>
```
### Lists
```svelte
<nav class="list-nav">
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/users">Users</a></li>
</ul>
</nav>
```
---
## Utility Classes
```svelte
<!-- Token-aware backgrounds -->
<div class="bg-surface-100-800-token">Adapts to theme</div>
<!-- Typography -->
<h1 class="h1">Heading 1</h1>
<h2 class="h2">Heading 2</h2>
<p class="lead">Lead paragraph</p>
<!-- Badges -->
<span class="badge variant-filled-primary">Badge</span>
<span class="chip variant-filled-tertiary">Chip</span>
```
---
## Design Tokens
```css
/* Base colors */
--color-primary-500
--color-secondary-500
--color-surface-500
/* Color shades: 50-950 */
--color-primary-50 /* Lightest */
--color-primary-500 /* Base */
--color-primary-950 /* Darkest */
/* Typography */
--base-font-family
--heading-font-family
/* Border radius */
--theme-rounded-base
--theme-rounded-container
```
### Using Design Tokens
```svelte
<!-- Via Tailwind classes -->
<div class="bg-primary-500 text-on-primary-token">
Primary background
</div>
<!-- Via CSS variables -->
<div style="background-color: rgb(var(--color-primary-500));">
Custom styling
</div>
```
---
## Best Practices
1. **Always initialize stores** in root layout
2. **Use variant classes** for consistent styling
3. **Leverage design tokens** for theme-aware colors
4. **Use `-token` suffix** for auto dark/light switching
5. **Keep accessibility in mind** - use semantic HTML
## Anti-Patterns
| Anti-Pattern | Why It's Wrong | Correct Approach |
|-------------|----------------|------------------|
| Not initializing stores | Modals, toasts won't work | Call `initializeStores()` in layout |
| Forgetting `skeleton.css` | Components unstyled | Import before Tailwind directives |
| Using raw Tailwind colors | Breaks theming | Use design tokens |
| Missing `data-theme` | Theme not applied | Add to `<body>` |
| `darkMode: 'media'` | Wrong dark mode | Set `darkMode: 'class'` |
## Quick Troubleshooting
| Issue | Solution |
|-------|----------|
| Modal not showing | Call `initializeStores()` in root layout |
| No styling | Import `skeleton.css` in app.postcss |
| Theme not applying | Add `data-theme="skeleton"` to body |
| Dark mode broken | Set `darkMode: 'class'` in tailwind.config |
| Toast not appearing | Add `<Toast />` to root layout |
## Reference Documentation
- [Components Cheatsheet](quick-ref/components-cheatsheet.md)
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context โ no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes โ information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development โ guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.