spences10/svelte-components
Svelte component patterns. Use for web components, component libraries (Bits UI, Ark UI, Melt UI), form patterns, or third-party integration.
npx skills add https://github.com/spences10/svelte-claude-skills --skill svelte-components
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>
// svelte.config.js
export default {
compilerOptions: {
customElement: true,
},
};
<!-- MyButton.svelte -->
<svelte:options customElement="my-button" />
<button><slot /></button>
UI, Ark UI setup
elements
handling
defaultValue attribute enables easy form resets<!--
PROGRESSIVE DISCLOSURE GUIDELINES:
-->
Take spences10/svelte-components from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.