Packages
mishka_chelekom
0.0.9-beta.2
0.0.10-alpha.5
0.0.10-alpha.4
0.0.10-alpha.3
0.0.10-alpha.2
0.0.10-alpha.1
0.0.9
0.0.9-rc.2
0.0.9-rc.1
0.0.9-beta.5
0.0.9-beta.4
0.0.9-beta.3
0.0.9-beta.2
0.0.9-beta.1
0.0.9-alpha.20
0.0.9-alpha.18
0.0.9-alpha.17
0.0.9-alpha.16
0.0.9-alpha.15
0.0.9-alpha.14
0.0.9-alpha.13
0.0.9-alpha.12
0.0.9-alpha.11
0.0.9-alpha.10
0.0.9-alpha.9
0.0.9-alpha.8
0.0.9-alpha.7
0.0.9-alpha.6
0.0.9-alpha.5
0.0.9-alpha.4
0.0.9-alpha.3
0.0.9-alpha.2
0.0.9-alpha.1
0.0.8
0.0.8-rc.2
0.0.8-rc.1
0.0.8-beta.5
0.0.8-beta.4
0.0.8-beta.3
0.0.8-beta.2
0.0.8-beta.1
0.0.8-alpha.4
0.0.8-alpha.3
0.0.8-alpha.2
0.0.8-alpha.1
0.0.7
0.0.6
0.0.6-alpha.2
0.0.6-alpha.1
0.0.5
0.0.5-beta.2
0.0.5-beta.1
0.0.5-alpha.12
0.0.5-alpha.11
0.0.5-alpha.10
0.0.5-alpha.9
0.0.5-alpha.8
0.0.5-alpha.7
0.0.5-alpha.6
0.0.5-alpha.5
0.0.5-alpha.4
0.0.5-alpha.3
0.0.5-alpha.2
0.0.5-alpha.1
0.0.4
0.0.4-beta.3
0.0.4-beta.2
0.0.4-beta.1
0.0.4-alpha.9
0.0.4-alpha.8
0.0.4-alpha.7
0.0.4-alpha.6
0.0.4-alpha.5
0.0.4-alpha.4
0.0.4-alpha.3
0.0.4-alpha.2
0.0.4-alpha.1
0.0.3
0.0.3-alpha.3
0.0.3-alpha.2
0.0.3-alpha.1
0.0.2
0.0.2-rc.2
0.0.2-rc.1
0.0.2-beta.4
0.0.2-beta.3
0.0.2-beta.2
0.0.2-beta.1
0.0.2-alpha.3
0.0.2-alpha.2
0.0.2-alpha.1
0.0.1
Mishka Chelekom is a fully featured components and UI kit library for Phoenix & Phoenix LiveView
Current section
Files
Jump to
Current section
Files
usage-rules/components/stepper.md
# Stepper Component
Multi-step progress indicator with horizontal and vertical layouts.
**Documentation**: https://mishka.tools/chelekom/docs/stepper
> **For LLM Agents**: If you need more details, examples, or edge cases not covered here, fetch the full documentation from the URL above.
## Generate
```bash
mix mishka.ui.gen.component stepper
```
## Dependencies
| Type | Components |
|------|------------|
| **Necessary** | `icon` |
| **Optional** | None |
| **JavaScript** | None |
## Component Types
| Component | Description |
|-----------|-------------|
| `stepper/1` | Stepper container |
| `stepper_section/1` | Individual step |
## Attributes
### `stepper/1` Attributes
| Attribute | Type | Default | Description |
|-----------|------|---------|-------------|
| `variant` | `:string` | `"base"` | Style variant |
| `color` | `:string` | `"natural"` | Color theme |
| `size` | `:string` | `"small"` | Step size |
| `margin` | `:string` | `"medium"` | Step margin |
| `vertical` | `:boolean` | `false` | Vertical layout |
### `stepper_section/1` Attributes
| Attribute | Type | Default | Description |
|-----------|------|---------|-------------|
| `step` | `:string` | `nil` | Step state (`current`, `loading`, `completed`, `canceled`) |
| `title` | `:string` | `nil` | Step title |
| `description` | `:string` | `nil` | Step description |
| `icon` | `:string` | `nil` | Custom icon |
## Available Options
### Variants
`base`, `default`, `gradient`
### Colors
`base`, `natural`, `primary`, `secondary`, `success`, `warning`, `danger`, `info`, `silver`, `misc`, `dawn`
### Sizes
`extra_small`, `small`, `medium`, `large`, `extra_large`
## Usage Examples
### Basic Stepper
```heex
<.stepper>
<.stepper_section step="completed" title="Step 1" description="Account created" />
<.stepper_section step="current" title="Step 2" description="Verify email" />
<.stepper_section title="Step 3" description="Complete profile" />
</.stepper>
```
### With Colors
```heex
<.stepper color="primary">
<.stepper_section step="completed" title="Order Placed" />
<.stepper_section step="current" title="Processing" />
<.stepper_section title="Shipped" />
<.stepper_section title="Delivered" />
</.stepper>
```
### Vertical Layout
```heex
<.stepper vertical color="info">
<.stepper_section step="completed" title="Sign Up" description="Create your account" />
<.stepper_section step="current" title="Verification" description="Verify your email" />
<.stepper_section title="Setup" description="Configure your preferences" />
<.stepper_section title="Done" description="Start using the app" />
</.stepper>
```
### Different Sizes
```heex
<.stepper size="small">
<.stepper_section step="completed" title="Step 1" />
<.stepper_section step="current" title="Step 2" />
<.stepper_section title="Step 3" />
</.stepper>
<.stepper size="large">
<.stepper_section step="completed" title="Step 1" />
<.stepper_section step="current" title="Step 2" />
<.stepper_section title="Step 3" />
</.stepper>
```
### Loading State
```heex
<.stepper color="primary">
<.stepper_section step="completed" title="Upload" />
<.stepper_section step="loading" title="Processing" />
<.stepper_section title="Complete" />
</.stepper>
```
### Canceled State
```heex
<.stepper>
<.stepper_section step="completed" title="Started" />
<.stepper_section step="canceled" title="Failed" />
<.stepper_section title="Complete" />
</.stepper>
```
### With Custom Icons
```heex
<.stepper color="success">
<.stepper_section step="completed" icon="hero-user" title="Account" />
<.stepper_section step="current" icon="hero-envelope" title="Email" />
<.stepper_section icon="hero-check" title="Done" />
</.stepper>
```
## Common Patterns
### Checkout Process
```heex
<.stepper color="primary">
<.stepper_section
step={if @step > 1, do: "completed", else: if(@step == 1, do: "current")}
title="Cart"
description="Review items"
/>
<.stepper_section
step={if @step > 2, do: "completed", else: if(@step == 2, do: "current")}
title="Shipping"
description="Enter address"
/>
<.stepper_section
step={if @step > 3, do: "completed", else: if(@step == 3, do: "current")}
title="Payment"
description="Add payment"
/>
<.stepper_section
step={if @step == 4, do: "current"}
title="Confirm"
description="Place order"
/>
</.stepper>
```
### Onboarding Flow
```heex
<.stepper vertical size="large" color="info">
<.stepper_section
step="completed"
icon="hero-user-circle"
title="Create Account"
description="Sign up with email or social login"
/>
<.stepper_section
step="current"
icon="hero-identification"
title="Complete Profile"
description="Add your personal information"
/>
<.stepper_section
icon="hero-cog-6-tooth"
title="Preferences"
description="Set your notification preferences"
/>
<.stepper_section
icon="hero-rocket-launch"
title="Get Started"
description="Explore the platform"
/>
</.stepper>
```