Skip to main content

Overview

Svelte Atoms Core components are built with composability at their core. Components are organized into namespaces (like Dialog, Input, Dropdown) and use a compositional pattern where you combine multiple sub-components to build complex UIs.

Basic Component Usage

Simple Button

The simplest component to start with is the Button:

Dialog Example

Dialogs follow a compositional pattern with multiple sub-components:

Composable Components

Combine Dropdown and Input components to create a searchable dropdown:
The filterDropdownData utility helps you filter dropdown items based on user input. It returns a reactive object with query and current properties.

Component Extensibility

Using base Props

Transform components by wrapping them with other components using the base prop:
The base prop allows you to use any component as the base element, enabling powerful composition patterns.

Working with Animations

Svelte Animations

Seamlessly integrate with Svelte’s animation system:

Advanced Animations with Motion

Use lifecycle hooks for advanced animations:

Component Patterns

Root components manage the overall state and context for a component group.
Common Root Props:
  • open - Control visibility
  • disabled - Disable interactions
  • factory - Custom bond factory

Next Steps

State Management

Learn about bonds and Svelte 5 runes for state management

Customization

Discover how to customize components with variants and props

TypeScript

Explore TypeScript support and type definitions

API Reference

Browse the complete API documentation