Quick Start
This guide will walk you through creating your first interactive UI with Svelte Atoms Core. We’ll build a complete form with a dialog, demonstrating the library’s composability and reactivity.What We’ll Build
We’ll create a user registration form with:- Input fields for name and email
- A button to open a confirmation dialog
- A dialog with header, body, and footer sections
- Reactive state management using Svelte 5 runes
Create a New Component
Create a new file called
RegistrationForm.svelte in your project:RegistrationForm.svelte
Build the Form
Add the form structure with input fields:
RegistrationForm.svelte
The
Input component is composed of Input.Root and Input.Control. This pattern allows for flexible composition with icons, placeholders, and other elements.Add the Confirmation Dialog
Add a dialog that appears after form submission:
RegistrationForm.svelte
The
Dialog.Root component manages the dialog state. By binding to the open prop, we can control the dialog from our component logic.Advanced Example: Searchable Dropdown
Let’s create a more advanced component - a multi-select dropdown with search functionality:FruitSelector.svelte
Key Concepts
Composition with base
The base prop allows you to use one component as the foundation for another:
Component Structure
Many components follow a Root/Content pattern:Reactive State with Runes
Use Svelte 5 runes for reactive state:Next Steps
Now that you’ve built your first components, explore more:Component Library
Explore all 30+ components with examples
Styling Guide
Learn how to customize component styles
Composition Patterns
Master advanced composition techniques
API Reference
Deep dive into component APIs and props
Need Help?
View Examples
Check out the Storybook for interactive examples of every component