Svelte Components

spences10/svelte-skills-kit/plugins/svelte-skills/skills/svelte-components

by spences102a9d88379bf62cee464a16db852edda7790a58f5No licenseListed Oct 9, 2026Updated Oct 9, 2026

Svelte component patterns. Use for web components, component libraries (Bits UI, Ark UI, Melt UI), form patterns, or third-party integration.

Instructions onlySoftware Development
AI-generated overview

Reference guidance on Svelte component patterns, including component libraries, web components, and form handling.

What it does
Provides quick-reference instructions for building Svelte components, covering headless component libraries such as Bits UI, Ark UI, and Melt UI, custom element configuration, and form patterns. It points to three reference files for library setup, web components, and advanced form handling. It produces guidance and code snippets rather than generated files.
When to use it
Use when working with Svelte components, especially when integrating component libraries, building custom elements, or handling form patterns. It is suited to quick lookups during Svelte front-end work.
Requirements
No scripts or special tooling are required; it is instructions and reference documents only. A Svelte project is implied for applying the patterns.

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:

svelte
<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

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

Reference Files

  • component-libraries.md [blocked] - Bits UI, Ark UI setup
  • web-components.md [blocked] - Building custom elements
  • form-patterns.md [blocked] - Advanced form handling

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
<!-- PROGRESSIVE DISCLOSURE GUIDELINES: - Keep this file ~50 lines total (max ~150 lines) - Use 1-2 code blocks only (recommend 1) - Keep description <200 chars for Level 1 efficiency - Move detailed docs to references/ for Level 3 loading - This is Level 2 - quick reference ONLY, not a manual -->

Source and attribution

Source:spences10/svelte-skills-kitinplugins/svelte-skills/skills/svelte-componentsat commit2a9d883

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal