Forms

Legend

The title of a <fieldset>, styled as a heading. tk:fieldset renders it from its label; write the tag yourself inside a fieldset of your own, or when the title needs markup the label prop cannot carry.

Shipping address
Blade

A <legend> with "Shipping address" in the heading style (extra-bold, two steps above body text), which names the fieldset for screen readers.

With an icon and a badge #

The icon before the title and the badge after it, vertically centered on the line.

Billing Optional
Blade

Sizes #

size comes from tk:heading, from xs to 3xl; scale sets how far above body text it is.

Payment method (sm)
Payment method (md)
Payment method (lg)
Payment method (xl)
Payment method (scale smallest)
Blade

Variants and colors #

variant picks the neutral color (strong, subtle, accent) and color any palette color.

Notifications (strong)
Notifications (subtle)
Notifications (accent)
Danger zone
Blade

Dimmed when disabled #

Inside a disabled tk:fieldset the legend is dimmed together with the fields.

Team plan Upgrade to edit
Blade

Customization #

Classes go to the <legend>; the parts take the element prefixes, such as icon:class.

Billing
Blade

Reference

tk:legend

Prop Type Default Description
label string | slot null The title, translated. The default slot takes its place.

Also accepts the element props (icon, badge, suffix...) and the props of tk:heading (size, scale, variant, color).

Slots

Slot Description
default The title, in place of label.

Customization

Classes and attributes go to the <legend> element; the parts take the prefixes of the element props (icon:, badge:...).

blade

Accessibility

A native <legend>: as the first child of a <fieldset>, it names the group, and screen readers announce it when focus enters any field inside.

Behavior notes

  • With no label, no slot content and no other part (icon, badge...), nothing is rendered.
  • It is dimmed while its tk:fieldset is disabled.