Skip to content
loseta

Components / Forms

Label

Renders an accessible label associated with a control.

Status stableWorks with field, input
<div class="field">
  <label class="label" for="demo-label">Your name</label>
  <input class="input" id="demo-label" placeholder="Ada Lovelace">
</div>

Installation

pnpm dlx loseta add label
npx loseta add label

Accessibility and behavior

  • Use .label or a native <label> inside .field. A label wrapping a .field becomes a selectable card.

Files

components/label.cssbase
styles/nova/label.cssstyle

Install contract

The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.

← Back to components

loseta is MIT licensed. Built with native CSS, no runtime. Inspired byshadcn/ui.