Label

A thin, mostly-typographic wrapper around Radix Label. Ties a caption to a form field via htmlFor. The only sketch chrome is a small hand-drawn dot after the text when required is set.

<Label htmlFor="email" required={true} roughness={1.5}>
  Email
</Label>
<Input id="email" placeholder="you@studio.dev" />

CLI install

npx doodleui-react add label

Usage

import { Label, Input } from "doodleui-react";

<Label htmlFor="email" required>
  Email
</Label>
<Input id="email" placeholder="you@studio.dev" />

Text stays real HTML — only the required mark is drawn.

Props

PropTypeDefaultNotes
htmlForstringundefinedTies the label to a field's id, same as the native attribute.
requiredbooleanfalseAdds a small hand-drawn accent dot after the text.
animatebooleantrueDraw-in the required mark on mount. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.