A focused reference for building Svelte components, whether you're creating web components, working with headless libraries like Bits UI and Melt UI, or handling tricky form patterns. The quick start covers the essentials: configuring custom elements, using the form attribute to link inputs outside traditional form wrappers, and leveraging component primitives. What's helpful here is the progressive disclosure approach. You get the patterns you need immediately, with deeper documentation tucked into reference files. If you're integrating third-party component libraries or need to turn Svelte components into portable web components, this gives you the setup without the noise.

skills.sh installs
566
GitHub stars
95
last updated
Aug 21, 2026

Install

$ npx -y skills add spences10/svelte-skills-kit --skill svelte-components --agent claude-code

Installs into .claude/skills of the current project.

Files

Svelte Components

Quick Start

Component libraries: Bits UI (headless) | Ark UI | Melt UI (primitives)

Form trick: Use form attribute when form can't wrap inputs:

<form id="my-form" action="/submit"><!-- outside table --></form>
<table>
	<tr>
		<td><input form="my-form" name="email" /></td>
		<td><button form="my-form">Submit</button></td>
	</tr>
</table>

Web Components

// svelte.config.js
export default {
	compilerOptions: {
		customElement: true,
	},
};
<!-- MyButton.svelte -->
<svelte:options customElement="my-button" />

<button><slot /></button>

Reference Files

Notes

  • Bits UI 1.0: flexible, unstyled, accessible components for Svelte
  • Form defaultValue attribute enables easy form resets
  • Use snippets to wrap rich HTML in custom select options
  • Last verified: 2025-01-14

Sponsors

Details

Repository
github.com/spences10/svelte-skills-kit
Category
Frontend Development
First seen
Jun 3, 2026

More from spences10/svelte-skills-kit

All 8
1davila7 avatartailwind-patternsdavila7/claude-code-templatesTailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.564skills.sh installs
2davila7 avatarreact-best-practicesdavila7/claude-code-templatesComprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering. Use when 550skills.sh installs
3heyman333 avatarios-glass-ui-designerheyman333/atelier-uiRedesign mobile app UI to feel unmistakably iOS-native with modern Apple-like glass materials (translucency, blur, depth). Use this skill when designing iOS-fir511skills.sh installs
4secondsky avatarreact-composition-patternssecondsky/claude-skillsReact composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reus494skills.sh installs
5lobehub avatarvercel-react-best-practiceslobehub/lobehubReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c489skills.sh installs
6aj-geddes avatarvue-application-structureaj-geddes/useful-ai-promptsStructure Vue 3 applications using Composition API, component organization, and TypeScript. Use when building scalable Vue applications with proper separation o447skills.sh installs