Default
Red pencil through the old plan. The line tilts a little and pokes out past both ends.
A red pencil through real words: one line, two lines, or a cross-out. The text stays readable and real underneath, so a price that was 49 can still be copied and read by a screen reader.
npx shadcn@latest add @wobko/strike第一次使用?先把 registry 加进 components.json。 如何安装
Red pencil through the old plan. The line tilts a little and pokes out past both ends.
A single line, a double line, a cross-out over the whole phrase, and other pens.
The old price stays in the text (and in the accessibility tree as <s>), so nothing is lost to a screen reader; the card says what changed.
Tick a box and the task is struck through in red pencil, drawn on as you tick it.
A <s> (or your own element with asChild) that hosts the drawing, in front of the words. One line per line of the phrase; a cross-out is one X over the whole phrase.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| kind | "single" | "double" | "cross" | "single" | One line, two lines, or two long diagonals across the phrase. |
| tone | "red" | "ink" | "blue" | "green" | "pencil" | "marker" | "orange" | "red" | The pen. Red is a waxy colored pencil. |
| weight | "fine" | "regular" | "brush" | "regular" | Fine-liner, regular or brush. |
| animate | boolean | false | Draw the line on the first time it scrolls into view. |
| show | boolean | true | Show or hide the line. With animate, turning it on plays the draw-on. |
| delay | number | - | Milliseconds to wait before drawing on. |
| seed | string | number | - | Pins the hand. |
| asChild | boolean | false | Render the line on your own child element. |
CLI 会复制进你项目的文件。
正在加载源码