Label — Vanilla

Form label with vanilla HTML. Ensure Rizzo CSS is loaded.

Label

Standalone form label. Use for and matching id on the input. Add label--required when the field is required.

Add this component

The command below includes <strong>Label</strong>—run it in your project directory to install this component (and the CSS if needed). No prompts.

Choose your package manager — click a tab to select, then copy the command.

npm pnpm yarn bun
Live example

HTML

html html
<div class="form-group">
  <label class="label label--required" for="email">Email</label>
  <input id="email" type="email" class="form-input" placeholder="you@example.com" />
</div>

Other frameworks: Astro · Svelte · Vue · React