组件

Clipboard

A board with a spring clip holding a sheet of paper. The board is one drawn sheet (hardboard with the grain of its fiber, or colored plastic; a bevel lit from the upper left) that turns and casts its own shadow; the chrome clip is drawn over the paper it holds. The sheet is real DOM: put a form, a checklist or notes on it.

安装

terminal
npx shadcn@latest add @wobko/clipboard

第一次使用?先把 registry 加进 components.json。 如何安装

示例

A clipboard

Hardboard with the grain of its fiber, a chrome spring clip over the paper, and a checklist on the ruled sheet (each row is one 28 px line).

Hardboard and plastic

The same board in hardboard and in colored plastic. The paper stays cream, so nothing on it changes contrast.

Graph paper and tape

The paper is a Paper: graph rules, a strip of tape across a corner, a small extra note taped on top.

A sign-in sheet

A real form on the paper: a name, a visit, a button, and the visitors so far listed as they sign. The paper is a `form` with a label.

API 参考

Clipboard

A flex column at most 28 rem wide. It leaves 3.5 rem at the top for the clip and a 1.5 rem rim round the paper. Until it is measured (or given `size`) it wears a plain board.

属性类型默认值说明
tone"hardboard" | Accent"hardboard"Hardboard, or a plastic board in tomato, tangerine, lemon, grass, teal, sky, grape or bubblegum.
tilt / seed / sizeboolean | number / string | number / [w, h]-A seeded turn under 1.2 degrees (or degrees, or false); pins the hand; the box in px for server-rendered drawings.

ClipboardPaper

The sheet on the board: a Paper with ruled lines and a red margin by default, tucked 1.5 rem under the clip. Text starts 3.5 rem in, past the margin.

属性类型默认值说明
as"div" | "section" | "article" | "form" | "fieldset""div"The element.
stock / rules / tape / tilt / seedPaper props-As on any sheet: graph paper, a torn edge, a strip of tape.

无障碍

  • The board and the clip are aria-hidden decoration (the clip is an intrinsic `prop` drawn over the paper, with no pointer events); everything on the paper is ordinary content. Make the paper a `form`, `section` or `article` with a label when it means more than a block of text.
  • Ink on the paper is 14:1. The paper is drawn on cream even on a colored board, so contrast never depends on the board's color. The clip hides in calm density; the tilt is zero there.
  • Windows high contrast replaces the board with an outline; the paper keeps its own.

源码

CLI 会复制进你项目的文件。

正在加载源码