w1c-label

Label

Use w1c-label for visible labels next to W1C form controls.

import '@w1c/components/label';
<w1c-label for="hostname" required>Hostname</w1c-label>

API

  • for: id of the labelled control.
  • text: fallback text when the default slot is empty.
  • required
  • disabled

Slots

  • default content

CSS Parts

  • label
  • required