DocsComponentsLabel
Label
A label for a form control.
1 file
<div class="flex items-center gap-2">
<pb-ui.checkbox id="terms" />
<pb-ui.label for="terms">Accept terms and conditions</pb-ui.label>
</div>Installation
pyblade-ui add label- Copy this file into your projectcomponents/ui/label.html
<label data-slot="label" {{ attributes.cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50") }}>{{ slot }}</label> - Update the path to fit your project
The
componentsfolder is the one set inpyblade.toml.
Usage
The tag <pb-ui.label> is available in all your templates.
<pb-ui.label for="email">Email</pb-ui.label>