组件

Doodle

Margin doodles: a star, a sun, a flower, a mushroom. Line-led, with one flat fill in register. Use them in the decoration layer, on empty states and in corners of cards.

安装

terminal
npx shadcn@latest add @wobko/doodle

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

示例

Default

96 px: line-led, one marker fill that misses the outline, a light pencil shading in the lower right.

Sizes are redrawn

Below 72 px a doodle switches to its 48 px drawing: the silhouette and one identifying detail, drawn with a heavier line.

In the margin

Doodles live in the decoration layer: turned a few degrees, tucked in the corner of a card, next to a title.

Every doodle drawn so far

Grows by itself as the doodle batches land.

API 参考

Doodle

An intrinsic ink svg drawn from a skeleton at the size you ask for, redrawn (not scaled) below 72 px.

属性类型默认值说明
nameDoodleName | string-A doodle id (`star`, `sun`, `flower`, `mushroom`...).
sizenumber96Pixels. Below 72 the 48 px redraw (silhouette and one detail, heavier line), from 72 the 96 px master, from 128 the hero tier.
accentAccent | "hi" | "kraft"-Color of the accent washes, for doodles that have them.
seedstring | number-Another seed, another hand.
rotatenumber-Degrees. Corner flourishes are drawn for the top-left and turned by you.
flipboolean-Mirror horizontally (CSS).
labelstring-Accessible name. Decorative (`aria-hidden`) without it.

无障碍

  • Decorative by default; give it a `label` only when it carries meaning that the surrounding text does not.

源码

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

正在加载源码