
Svelte Components
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-codeInstalls 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
- component-libraries.md - Bits UI, Ark UI setup
- web-components.md - Building custom elements
- form-patterns.md - Advanced form handling
Notes
- Bits UI 1.0: flexible, unstyled, accessible components for Svelte
- Form
defaultValueattribute 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