Skip to content

Label

Label is a standalone form label element. Use it when you need a label outside of FormGroup, or when building custom form layouts.

Basic usage

Tailwind v4
vue
<Label for="name">Full name</Label>
<Input id="name" v-model="name" />

Required indicator

Tailwind v4
vue
<Label for="email" required>Email address</Label>
<Input id="email" v-model="email" type="email" />

The required prop appends a red * to the label text.

When to use Label vs FormGroup

  • Use FormGroup when you want the full field wrapper: label + field + error/hint in one block. This is the standard for most forms.
  • Use Label when you need a label independently — e.g. in a custom grid layout where the error handling is managed elsewhere.

Props

PropTypeDefaultDescription
forstringfor attribute linking the label to an input id
requiredbooleanfalseAppends a red * to the label

Slots

SlotDescription
defaultLabel text

Private — Jetpack Labs internal use only