AccordionAlertAlert DialogAspect RatioAvatarBadgeBreadcrumbButtonButton GroupCalendarCardCarouselChartCheckboxCollapsibleComboboxCommandContext MenuData TableDate PickerDialogDirectionDrawerDropdown MenuEmptyFieldHover CardInputInput GroupInput OTPItemKbdLabelMenubarNative SelectNavigation MenuPaginationPopoverProgressRadio GroupResizableScroll AreaSelectSeparatorSheetSidebarSkeletonSliderSonnerSpinnerSwitchTableTabsTextareaToastToggleToggle GroupTooltipTypography
Checkbox
A control that allows the user to toggle between checked and not checked.
templ
templ CheckboxDemo() {
<div class="flex items-center space-x-2">
@ui.Checkbox("terms", "", templ.Attributes{"id": "terms"})
@ui.Label("", templ.Attributes{"for": "terms"}) {
Accept terms and conditions
}
</div>
}