Skip to content
GitHub11 stars

Renders an accessible label associated with controls.

<div class="flex gap-2">
    <Checkbox id="terms" />
    <Label for="terms">Accept terms and conditions</Label>
</div>

Installation

dnx Blazix.Cli add label

Usage

<Label for="email">Your email address</Label>

Label in Field

For form fields, use the Field component which includes built-in FieldLabel, FieldDescription, and FieldError components.

<Field>
    <FieldLabel for="email">Your email address</FieldLabel>
    <Input id="email" />
</Field>
Payment Method

All transactions are secure and encrypted

Enter your 16-digit card number

Billing Address

The billing address associated with your payment method

<div class="w-full max-w-md">
    <form>
        <FieldGroup>

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

<div class="flex gap-2">
    <Checkbox id="terms-rtl" />
    <Label for="terms-rtl">@Texts[Language]</Label>

API Reference

Label

ParameterTypeDefault
Class string? -
ChildContent RenderFragment? -

Other attributes are passed to the element it renders.