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

@sea-lion/react-blockquote

v0.3.0

Published

Blockquote 是引用块组件,用于展示引用内容,支持多种尺寸、字重、颜色与文本换行控制。

Downloads

16

Readme

react-blockquote

Blockquote 是引用块组件,用于展示引用内容,支持多种尺寸、字重、颜色与文本换行控制。

安装

pnpm add @sea-lion/react-blockquote
# 或者
npm install @sea-lion/react-blockquote
yarn add @sea-lion/react-blockquote

使用

在代码中引入组件:

import { Blockquote } from '@sea-lion/react-blockquote';

基本用法

<Blockquote>道可道,非常道。名可名,非常名。</Blockquote>
<Blockquote size="3" color="blue">带尺寸和颜色的引用</Blockquote>

不同尺寸

支持尺寸 "1""9",尺寸越大文字越大:

<Flex direction="column" gap="4">
  {['1', '2', '3', '4', '5', '6', '7', '8', '9'].map((size) => (
    <Blockquote key={size} size={size}>
      道可道,非常道。名可名,非常名。
    </Blockquote>
  ))}
</Flex>

不同字重

通过 weight 属性设置字体粗细:

<Flex direction="column" gap="4">
  <Blockquote weight="light">light — 道可道,非常道。</Blockquote>
  <Blockquote weight="regular">regular — 道可道,非常道。</Blockquote>
  <Blockquote weight="medium">medium — 道可道,非常道。</Blockquote>
  <Blockquote weight="bold">bold — 道可道,非常道。</Blockquote>
</Flex>

不同颜色

通过 color 属性设置引用块的颜色主题:

<Flex direction="column" gap="4">
  {['gray', 'gold', 'bronze', 'red', 'blue', 'green'].map((color) => (
    <Blockquote key={color} color={color}>
      道可道,非常道。名可名,非常名。
    </Blockquote>
  ))}
</Flex>

文本换行控制

通过 truncatewrap 属性控制文本换行行为:

<div style={{ width: '400px' }}>
  {/* 默认换行 */}
  <Blockquote>
    人法地,地法天,天法道,道法自然。上善若水,水善利万物而不争。
  </Blockquote>

  {/* 单行省略 */}
  <Blockquote truncate>
    人法地,地法天,天法道,道法自然。上善若水,水善利万物而不争。
  </Blockquote>

  {/* 禁止换行 */}
  <Blockquote wrap="nowrap">
    人法地,地法天,天法道,道法自然。上善若水,水善利万物而不争。
  </Blockquote>
</div>

高对比度

通过 highContrast 属性启用高对比度模式:

<Flex direction="column" gap="4">
  {['gray', 'gold', 'bronze', 'red', 'blue', 'green'].map((color) => (
    <Blockquote key={color} color={color} highContrast>
      道可道,非常道。名可名,非常名。
    </Blockquote>
  ))}
</Flex>

Props / API

Blockquote

| 参数 | 说明 | 类型 | 默认值 | |------|------|------|--------| | size | 文字尺寸 | "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" | "3" | | weight | 字体粗细 | "light" \| "regular" \| "medium" \| "bold" | "regular" | | color | 颜色主题 | "gray" \| "gold" \| "bronze" \| "red" \| "blue" \| "green" | "gray" | | highContrast | 是否使用高对比度 | boolean | false | | truncate | 是否单行省略 | boolean | false | | wrap | 文本换行方式 | "wrap" \| "nowrap" \| "balance" \| "pretty" | - | | children | 引用内容 | React.ReactNode | - |

查看更多

参考 Radix UI 官方文档 获取完整 API 与设计规范。