Label

New

Overview

Label component to be called by the other form elements.

HEEx
<div class="example-fields w-full">
  <Label.label
    for="example-full-name"
    sublabel="(required)"
    description="Enter your name as it appears on your account."
  >
    Full name
  </Label.label>
  <input
    id="example-full-name"
    name="full_name"
    aria-describedby="example-full-name-description"
    class="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-control text-foreground shadow-xs transition-[color,box-shadow] placeholder:text-muted-foreground"
    placeholder="Ada Lovelace"
  />
</div>

Add this module

terminal
mix dizzy.add label

Component API

Label.label

Attributes

Attributes for Label.label
NameTypeDefault Values
class :any nil โ€”
description :string nil โ€”
description_id :string nil โ€”
disabled :boolean false โ€”
for :string nil โ€”
required :boolean false โ€”
rest :global nil โ€”
sublabel :string nil โ€”

Slots

Slots for Label.label
NameRequired Attributes
inner_block Required โ€”