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

@tanzhenxing/zx-divider

v1.0.4

Published

zx-divider 分割线组件,用于分割页面内容。支持水平/垂直方向、多种边框样式、文案位置控制等功能。

Readme

ZxDivider 分割线

用于区隔内容的分割线组件,参考 Element Plus Divider 组件设计。

功能特性

  • ✅ 基础水平分割线
  • ✅ 垂直分割线
  • ✅ 带文案的分割线
  • ✅ 多种边框样式(实线、虚线、点线、双线等)
  • ✅ 文案位置控制(左、中、右)
  • ✅ 暗色主题支持
  • ✅ 属性验证支持

使用方法

<script setup>
import ZxDivider from '@tanzhenxing/zx-divider'
</script>

<template>
  <div>
    <p>内容上方</p>
    <zx-divider />
    <p>内容下方</p>
  </div>
</template>

基础用法

水平分割线

<template>
  <div>
    <p>这是第一段内容</p>
    <zx-divider />
    <p>这是第二段内容</p>
  </div>
</template>

垂直分割线

<template>
  <div>
    <span>首页</span>
    <zx-divider direction="vertical" />
    <span>产品</span>
    <zx-divider direction="vertical" />
    <span>关于</span>
  </div>
</template>

带文案的分割线

<template>
  <div>
    <p>内容上方</p>
    <zx-divider>分割线文案</zx-divider>
    <p>内容下方</p>
  </div>
</template>

文案位置

<template>
  <div>
    <zx-divider content-position="left">左侧文案</zx-divider>
    <zx-divider content-position="center">居中文案</zx-divider>
    <zx-divider content-position="right">右侧文案</zx-divider>
  </div>
</template>

不同边框样式

<template>
  <div>
    <zx-divider border-style="solid">实线</zx-divider>
    <zx-divider border-style="dashed">虚线</zx-divider>
    <zx-divider border-style="dotted">点线</zx-divider>
    <zx-divider border-style="double">双线</zx-divider>
  </div>
</template>

API

Props

| 属性名 | 说明 | 类型 | 可选值 | 默认值 | |--------|------|------|--------|--------| | direction | 分割线方向 | String | horizontal | vertical | horizontal | | border-style | 边框样式 | String | none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | solid | | content-position | 文案位置(仅水平分割线有效) | String | left | center | right | center |

Slots

| 插槽名 | 说明 | |--------|------| | default | 分割线文案内容(仅水平分割线有效) |

样式变量

组件使用 CSS 变量,可以通过覆盖这些变量来自定义样式:

.zx-divider {
  --zx-border-color: #dcdfe6;           /* 分割线颜色 */
  --zx-border-color-lighter: #e4e7ed;   /* 浅色边框 */
  --zx-text-color-placeholder: #a8abb2; /* 文案颜色 */
  --zx-font-size-small: 12px;           /* 文案字体大小 */
}

暗色主题

组件支持暗色主题,在 .dark 类下会自动应用暗色样式:

.dark .zx-divider {
  --zx-border-color: #4c4d4f;
  --zx-border-color-lighter: #414243;
  --zx-text-color-placeholder: #8d9095;
}