Home / Market / svelte component

svelte component

svelte-component

claude-command★ 347030 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- allowed-tools: Read, Write, Edit argument-hint: [component-name] [--typescript] [--story] description: Create new Svelte components with best practices, TypeScript support, and testing

---

Create Svelte Component

Create new Svelte component: $ARGUMENTS

Current Svelte Project

Task

Create Svelte component with best practices. When creating components:

  1. Gather Requirements:
  1. Component Structure:
   <script lang="ts">
     // Imports
     // Type definitions
     // Props
     // State
     // Derived values
     // Effects
     // Functions
   </script>
   
   <!-- Markup -->
   
   <style>
     /* Scoped styles */
   </style>
  1. Best Practices:
  1. Component Types to Create:
  1. Additional Files:

Example Usage

User: "Create a Modal component with customizable header, footer slots, and close functionality"

Assistant will: