Design systém4.2

gov-form-checkbox

Properties

PropertyAttributeDescriptionTypeDefault
checkedcheckedCheckbox button statebooleanfalse
disableddisabledMakes the checkbox component disabled.booleanfalse
identifieridentifierCustom checkbox identifier.stringundefined
indeterminateindeterminateSame as original parameter (https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate)booleanfalse
invalidinvalidIndicates the entered value does not conform to the format expected by the application.booleanundefined
namenameName of the checkbox.stringundefined
noLabelno-labelWhen you can't use the form label.booleanfalse
requiredrequiredSet whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them. When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.booleanfalse
sizesizeCheckboxes size."l" | "m" | "s" | "xl" | "xs""m"
valuevalueValue of checkboxstringundefined

Events

EventDescriptionType
gov-blurEmitted when the checkbox loses focus.CustomEvent<FormCheckboxEvent>
gov-changeEmitted when the checkbox change value.CustomEvent<FormCheckboxEvent>
gov-focusEmitted when the checkbox has focus.CustomEvent<FormCheckboxEvent>

Methods

getRef() => Promise<HTMLInputElement>

Returns the reference of the native element

Returns

Type: Promise<HTMLInputElement>

Dependencies

Depends on

Graph


Built with StencilJS