Steps
Display numbered sequential steps with auto-incrementing counters, perfect for tutorials, installation guides, and multi-step processes.
Overview
The Steps and Step components work together to create visually appealing numbered step sequences. Using CSS counters, each step automatically increments without manual numbering. The components are ideal for tutorials, setup guides, migration instructions, and any sequential process documentation.
Basic Usage
First Step
This is the content of the first step. The number is automatically generated.
Second Step
Each subsequent step increments the counter automatically.
Third Step
You can include any markdown content inside a step.
Installation Guide Example
Create Configuration File
Create a vue.config.js file in your project root:
module.exports = {
  publicPath: "/",
  outputDir: "dist",
  assetsDir: "static",
};
Update Package.json
Add scripts to your package.json:
{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  }
}
Tutorial Example
Create Component File
Create a new file MyButton.vue in your components directory.
Add Template
Define your component's structure:
<template>
  <button class="btn">Click me</button>
</template>
Add Script Setup
Add your component logic:
<script setup lang="ts">
  const handleClick = () => {
    console.log("Button clicked!");
  };
</script>
Add Styles
Style your button:
<style scoped>
  .btn {
    padding: 0.5rem 1rem;
    background: #42b883;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
  }
  .btn:hover {
    background: #35495e;
  }
</style>
Import and Use
Import your component in App.vue:
<script setup>
  import MyButton from "./components/MyButton.vue";
</script>
<template>
  <MyButton @click="handleClick" />
</template>
With Lists and Code
Prerequisites
Before you begin, ensure you have:
- Node.js 18 or higher
- A package manager (npm, pnpm, yarn, or bun)
- Basic knowledge of Vue 3
- A code editor (VS Code recommended)
Configure Tailwind
Update your tailwind.config.js:
export default {
  content: [
    "./index.html",
    "./src/**/*.{vue,js,ts,jsx,tsx}",
    "./node_modules/@ui-thing/**/*.{vue,js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
};
Migration Guide Example
Backup Your Project
Before making changes, create a backup:
git add .
git commit -m "Backup before v2 migration"
git branch backup-v1
Update Dependencies
Update to the latest versions:
Update Component Imports
Change old import syntax:
// Before
// After
import { UiButton } from "ui-thing/components";
import { Button } from "ui-thing/v1";
Update Props
Several components have renamed props:
| Component | Old Prop | New Prop | 
|---|---|---|
| Button | variant | appearance | 
| Input | onChange | Use v-modelinstead | 
| Modal | visible | open | 
Update Styles
Some class names have changed:
- <UiButton class="btn-primary">
+ <UiButton appearance="primary">
API Setup Example
Create Server File
Create server.js:
import cors from "cors";
import dotenv from "dotenv";
import express from "express";
dotenv.config();
const app = express();
const PORT = process.env.PORT || 3000;
app.use(cors());
app.use(express.json());
app.get("/api/health", (req, res) => {
  res.json({ status: "ok" });
});
app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});
Configure Environment
Create .env file:
PORT=3000
DATABASE_URL=postgresql://localhost:5432/mydb
JWT_SECRET=your-secret-key
Create Schema
Define your data models in prisma/schema.prisma:
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
generator client {
  provider = "prisma-client-js"
}
model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  createdAt DateTime @default(now())
}
Nested Content
Understanding Components
Components are reusable pieces of UI. They can contain:
- Template - The HTML structure
- Script - The component logic
- Style - The component styling
.vue file.Component Communication
Components communicate through
Best Practices
- Keep components small and focused
- Use TypeScript for type safety
- Document props and emits
- Write unit tests
- Follow naming conventions
Troubleshooting Guide
Identify the Issue
First, gather information about the problem:
- What error message do you see?
- When did the issue start?
- What were you doing when it occurred?
- Can you reproduce it consistently?
Check the Console
Open browser DevTools (F12) and look for:
Search Documentation
Check if this is a known issue:
- Search the official docs
- Check GitHub issues
- Look for related discussions
- Review the changelog
Ask for Help
If you're still stuck, ask for help with:
- A clear description of the problem
- Steps to reproduce
- Your environment details (OS, Node version, etc.)
- Relevant code snippets
- Error messages and stack traces
- GitHub Issues
- Discord community
- Stack Overflow
Props
Steps
| Prop | Type | Default | Description | 
|---|---|---|---|
| class | any | - | Additional CSS classes for the container | 
Step
| Prop | Type | Default | Description | 
|---|---|---|---|
| class | any | - | Additional CSS classes for the step item | 
How It Works
The components use CSS counters to automatically number steps:
- Steps- Initializes the counter with- [counter-reset:_step]
- Step- Displays and increments the counter with- before:content-[counter(step)]and- before:[counter-increment:_step]
This means you don't need to manually number your steps - the browser handles it automatically!
Styling
The step indicator is created using CSS ::before pseudo-element:
- Size: 32px x 32px (8 Tailwind units)
- Background: Secondary color
- Text: Secondary foreground color
- Position: Absolute, left of the step content
- Border: Left border connects all steps
Custom Styling
You can customize the appearance with the class prop:
Customized Step
This step has a primary colored indicator.
Vue Component Usage
<template>
  <div>
    <!-- Basic usage -->
    <Steps>
      <Step>
        <h3>First Step</h3>
        <p>Step content goes here</p>
      </Step>
      <Step>
        <h3>Second Step</h3>
        <p>More content</p>
      </Step>
    </Steps>
    <!-- With custom classes -->
    <Steps class="border-primary">
      <Step class="before:bg-primary">
        <h3>Custom Styled Step</h3>
        <p>Custom indicator color</p>
      </Step>
    </Steps>
  </div>
</template>
Best Practices
- Use clear, action-oriented headings (e.g., "Install Dependencies" not "Dependencies")
- Keep each step focused on one task
- Include code examples where appropriate
- Add visual elements (callouts, icons) to enhance clarity
- Consider using collapsibles for optional or advanced content
- Test the flow to ensure steps are in logical order
- Use consistent heading levels (usually ###for step titles)
Accessibility
The components provide a clear visual hierarchy:
- Numbers help users track progress
- Vertical line shows connection between steps
- Clear spacing between steps
- Works with keyboard navigation
- Compatible with screen readers
Common Patterns
Installation + Configuration
Perfect for documenting software setup:
Problem → Solution
Document troubleshooting workflows:
Identify Issue
Check error messages...
Find Cause
Debug the problem...
Apply Fix
Implement the solution...
Verify
Test that it works...
Before → During → After
Show transformation processes: