Skip to content
Back to skills

Svelte Components

ASecurity

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

  • 91 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
developmentjavascriptjava

Works with

  • claude code

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned February 12, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Svelte Components?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Svelte Components
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/spences10-svelte-components/badge)](https://www.skillsdirectory.com/skills/spences10-svelte-components)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: svelte-components
# IMPORTANT: Keep description on ONE line for Claude Code compatibility
# prettier-ignore
description: Svelte component patterns. Use for web components, component libraries (Bits UI, Ark UI, Melt UI), form patterns, or third-party integration.
---

# 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.js
export default {
	compilerOptions: {
		customElement: true,
	},
};
```

```svelte
<!-- MyButton.svelte -->
<svelte:options customElement="my-button" />

<button><slot /></button>
```

## Reference Files

- [component-libraries.md](references/component-libraries.md) - Bits
  UI, Ark UI setup
- [web-components.md](references/web-components.md) - Building custom
  elements
- [form-patterns.md](references/form-patterns.md) - 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
-->

Files in this skill

  • SKILL.md1.7 KB
  • references/component-libraries.md2 KB
  • references/form-patterns.md3 KB
  • references/web-components.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.