Default
A felt-tip line under a phrase. It rises a little to the right, starts a hair early and runs past the last letter.
A pen line under real words: single, double, wavy or scribbled, in felt, pencil or marker. It follows the phrase line by line when it wraps, and can draw itself on as it scrolls into view.
npx shadcn@latest add @wobko/underline第一次使用?先把 registry 加进 components.json。 如何安装
A felt-tip line under a phrase. It rises a little to the right, starts a hair early and runs past the last letter.
Single, double, wavy and scribbled lines; felt, blue felt, red felt, pencil and marker; fine, regular and brush.
An underline that wraps onto several lines is one pull per line. Press replay to watch it being drawn.
A double brush line under a title, a wavy pencil line under a caption: the pen grows with the type.
A <span> (or your own element with asChild) that hosts the drawing. One aria-hidden line per line of the phrase, measured from the browser's own line boxes.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| kind | "single" | "double" | "wavy" | "scribble" | "single" | The line. Single rises to the right like a real one; double is two pulls; wavy is a squiggle; scribble is a fast zig-zag. |
| tone | "ink" | "blue" | "red" | "green" | "pencil" | "marker" | "orange" | "ink" | The pen. Blue is the reserved "you" felt; red is for corrections. |
| weight | "fine" | "regular" | "brush" | "regular" | Fine-liner, felt tip or brush pen. Text under 15 px takes the fine-liner by itself, and the pen grows with larger type. |
| animate | boolean | false | Draw the line on, left to right, the first time the phrase scrolls into view. Reduced motion just shows it. |
| show | boolean | true | Show or hide the line. With animate, turning it on plays the draw-on. |
| delay | number | - | Milliseconds to wait before the first line draws on; each further line follows a beat later. |
| seed | string | number | - | Pins the hand. Default: derived from useId(), so server and client draw the same line. |
| asChild | boolean | false | Render the line on your own child element (a link, a strong). |
CLI 会复制进你项目的文件。
正在加载源码