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-collapse

v0.1.1

Published

Collapse component for DaFlow UI

Readme

@daflow-ui/ui-collapse

基于 Ark UI Collapsible 封装的折叠面板组件,支持 v-model、手风琴模式、禁用状态与自定义标题。

Installation

pnpm add @daflow-ui/ui-collapse

Usage

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

import '@daflow-ui/ui-collapse/style.css';

在组件中使用:

<script setup lang="ts">
import { ref } from 'vue';
import { DfCollapse, DfCollapseItem } from '@daflow-ui/ui-collapse';

const activeNames = ref(['1']);
</script>

<template>
  <DfCollapse v-model="activeNames">
    <DfCollapseItem name="1" title="一致性 Consistency">
      与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念
    </DfCollapseItem>
    <DfCollapseItem name="2" title="反馈 Feedback">
      控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作
    </DfCollapseItem>
  </DfCollapse>
</template>

自定义标题

<template>
  <DfCollapse v-model="activeNames">
    <DfCollapseItem name="1">
      <template #title>
        <span style="color: #409eff">自定义标题</span>
      </template>
      内容
    </DfCollapseItem>
  </DfCollapse>
</template>

API

DfCollapse Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | modelValue | string \| number \| Array<string \| number> | [] | 当前激活的面板,手风琴模式下为单个值 | | accordion | boolean | false | 是否为手风琴模式(每次只能展开一个面板) |

DfCollapse Events

| 事件 | 参数 | 说明 | |------|------|------| | update:modelValue | (value: CollapseModelValue) | v-model 更新事件 | | change | (value: CollapseModelValue) | 当前激活面板改变时触发 |

DfCollapseItem Props

| 属性 | 类型 | 默认值 | 说明 | |------|------|--------|------| | name | string \| number | - | 唯一标识符 | | title | string | - | 面板标题 | | disabled | boolean | false | 是否禁用该面板 |

DfCollapseItem Slots

| 插槽名 | 说明 | |--------|------| | default | 面板内容 | | title | 自定义标题 |

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