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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@uiw/react-divider

v4.22.3

Published

Divider component

Downloads

823

Readme

Divider 分割线

Buy me a coffee Open in unpkg NPM Downloads npm version

区隔内容的分割线。

import { Divider } from 'uiw';
// or
import Divider from '@uiw/react-divider';

基础实例

基础实例包含虚线分割线、带文本的分割线、实线分割线。

import React from 'react';
import { Divider } from 'uiw';

export default function Demo() {
  return (
    <div style={{ maxWidth: 530 }}>
      <div>周星驰: 香港演员、导演。祖籍浙江宁波,1962年6月22日生于香港,他是香港最为重要的喜剧片演员与编导之一。中学毕业以后考入香港无线电视台艺员训练班的夜间部。结业后成为无线艺人,最初曾在《香城浪子》《射雕英雄传》等剧集中担任临时演员。</div>
      <Divider />
      <div>古有关云长全神贯注下象棋刮骨疗毒,今有我零零漆聚精会神看A片挖骨取弹头。</div>
      <Divider>大话西游</Divider>
      <div>曾经有一份真诚的爱情放在我面前,我没有珍惜,等我失去的时候我才后悔莫及,人世间最痛苦的事莫过于此。 如果上天能够给我一个再来一次的机会,我会对那个女孩子说三个字:我爱你。 如果非要在这份爱上加上一个期限,我希望是…… 一万年</div>
      <Divider dashed />
      <div>曾经痛苦,才知道真正的痛苦;曾经执著,才能放下执著;曾经牵挂,才能了无牵挂。</div>
    </div>
  );
}

垂直分割线

import React from 'react';
import { Divider } from 'uiw';

export default function Demo() {
  return (
    <div>
      首页
      <Divider type="vertical" />
      <a href="#">列表页面</a>
      <Divider type="vertical" />
      <a href="#">文章详情</a>
    </div>
  );
}

标题对齐位置

import React from 'react';
import { Divider } from 'uiw';

export default function Demo() {
  return(
    <div style={{ maxWidth: 530 }}>
      <Divider dashed />
      <div>周星驰: 香港演员、导演。祖籍浙江宁波,1962年6月22日生于香港,他是香港最为重要的喜剧片演员与编导之一。中学毕业以后考入香港无线电视台艺员训练班的夜间部。结业后成为无线艺人,最初曾在《香城浪子》《射雕英雄传》等剧集中担任临时演员。</div>
      <Divider align="left">大话西游</Divider>
      <div>古有关云长全神贯注下象棋刮骨疗毒,今有我零零漆聚精会神看A片挖骨取弹头。</div>
      <Divider>大话西游</Divider>
      <div>曾经有一份真诚的爱情放在我面前,我没有珍惜,等我失去的时候我才后悔莫及,人世间最痛苦的事莫过于此。</div>
      <Divider dashed align="right">大话西游</Divider>
      <div>曾经痛苦,才知道真正的痛苦;曾经执著,才能放下执著;曾经牵挂,才能了无牵挂。</div>
    </div>
  );
}

API

| 参数 | 说明 | 类型 | 默认值 | |--------- |-------- |--------- |-------- | | type | 水平还是垂直类型 | enum{horizontal,vertical} | horizontal | | dashed | 是否虚线 | Boolean | false | | align | 分割线标题的对齐位置 | Enum{left, right, center} | center |