npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@daflow-ui/ui-steps

v0.1.1

Published

Steps component for DaFlow UI

Readme

@daflow-ui/ui-steps

Steps 步骤条组件,用于引导用户按照流程完成任务。

特性

  • 🎯 基于 Ark UI 封装,稳定可靠
  • 📦 自动索引,无需手动管理步骤顺序
  • 🎨 支持水平和垂直两种布局
  • 🔄 支持动态增删步骤(v-if、v-for)
  • ♿️ 完整的无障碍支持
  • 🎭 灵活的插槽系统,支持自定义图标、标题、描述

Installation

pnpm add @daflow-ui/ui-steps

Usage

全局引入样式(在 main.ts 中):

import '@daflow-ui/ui-steps/style.css'

基础用法:

<script setup lang="ts">
import { ref } from 'vue'
import { DfSteps, DfStep } from '@daflow-ui/ui-steps'

const current = ref(0)

const handleNext = () => {
  if (current.value < 2) current.value++
}

const handlePrev = () => {
  if (current.value > 0) current.value--
}
</script>

<template>
  <DfSteps :current="current">
    <DfStep title="步骤 1" description="填写信息" />
    <DfStep title="步骤 2" description="确认信息" />
    <DfStep title="步骤 3" description="完成" />
  </DfSteps>

  <button @click="handlePrev">上一步</button>
  <button @click="handleNext">下一步</button>
</template>

带内容区域(内容由业务自行渲染):

<DfSteps :current="current">
  <DfStep title="填写信息" description="填写基本信息" />
  <DfStep title="确认信息" description="核对并确认" />
  <DfStep title="完成" description="提交成功" />
</DfSteps>

<div v-if="current === 0">
  <form><!-- 表单内容 --></form>
  <button @click="current++">下一步</button>
</div>
<div v-else-if="current === 1">
  <p>请确认信息...</p>
  <button @click="current--">上一步</button>
  <button @click="current++">提交</button>
</div>
<div v-else>
  <p>✅ 提交成功!</p>
</div>

说明:DfStep 仅负责渲染步骤条,不提供默认插槽;内容区域请在 DfSteps 外部自行渲染并用 current 控制显示。

v-for 渲染步骤:

<script setup lang="ts">
import { ref } from 'vue'

const current = ref(0)
const steps = [
  { key: 'draft', title: '草稿', description: '填写基本信息' },
  { key: 'review', title: '审核', description: '确认内容与信息' },
  { key: 'publish', title: '发布', description: '完成发布流程' }
]
</script>

<template>
  <DfSteps :current="current">
    <DfStep
      v-for="step in steps"
      :key="step.key"
      :title="step.title"
      :description="step.description"
    />
  </DfSteps>
</template>

API

DfSteps Props

| 属性 | 说明 | 类型 | 默认值 | |------|------|------|--------| | current | 当前激活步骤的索引(从 0 开始) | number | 0 | | direction | 步骤条方向 | 'horizontal' \| 'vertical' | 'horizontal' | | titlePlacement | 标题和指示器的布局关系 | 'horizontal' \| 'vertical' | 'horizontal' |

DfStep Props

| 属性 | 说明 | 类型 | 默认值 | |------|------|------|--------| | title | 步骤标题 | string | '' | | description | 步骤描述 | string | '' |

DfStep Slots

| 插槽名 | 说明 | 作用域参数 | |--------|------|----------| | icon | 自定义图标 | { index: number, status: string } | | title | 自定义标题 | { title: string, index: number } | | description | 自定义描述 | { description: string, index: number } |

Development

Install dependencies

pnpm install

Start playground (at monorepo root)

cd ../..  # 回到 monorepo 根目录
pnpm dev  # 启动统一 playground,自动发现组件

组件会自动出现在 playground 导航中(通过 dev/index.vue)。

Build

pnpm build

Type check

pnpm typecheck

Lint

pnpm lint
pnpm lint:fix

License

MIT