AccordionAlertAlert DialogAspect RatioAvatarBadgeBreadcrumbButtonButton GroupCalendarCardCarouselChartCheckboxCollapsibleComboboxCommandContext MenuData TableDate PickerDialogDirectionDrawerDropdown MenuEmptyFieldHover CardInputInput GroupInput OTPItemKbdLabelMenubarNative SelectNavigation MenuPaginationPopoverProgressRadio GroupResizableScroll AreaSelectSeparatorSheetSidebarSkeletonSliderSonnerSpinnerSwitchTableTabsTextareaToastToggleToggle GroupTooltipTypography
Label
Renders an accessible label associated with controls.
templ
templ LabelDemo() {
<div class="flex items-center space-x-2">
@ui.Checkbox("terms-label", "", templ.Attributes{"id": "terms-label"})
@ui.Label("", templ.Attributes{"for": "terms-label"}) {
Accept terms and conditions
}
</div>
}