Skip to main content

Checkbox

Checkbox | WebJET Element for selecting multiple options shadow

A checkbox, or also a check box, is an element that allows users to select one or more options from a set. Click on the checkbox to change its status to true or false.

Basic Usage

Indeterminate checkbox

When the indeterminate attribute is added, a checkbox is displayed whose default state is neutral, i.e. neither true nor false.

Variant

Adding the variant attribute with the value circle will display a checkbox in a round shape.

Attributes and Properties

checked

DescriptionIf true, the default state of the checkbox is changed to true
Attributechecked
Typeboolean
Defaultfalse

color

DescriptionSpecifies the background color of the checkbox. The default options are "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information, go to: theming.
Attributecolor
Type"danger." | "primary" | "success" | "neutral" | "complete" | "warning" | string | undefined
Defaultundefined

disabled

DescriptionIf true, the checkbox cannot be interacted with
Attributedisabled
Typeboolean
Defaultfalse

indeterminate

DescriptionIf true, displays a checkbox whose default state is neutral.
Attributeindeterminate
Typeboolean
Defaultfalse

Option

DescriptionIf true, the appearance of the checkbox is changed to round.
AttributeOption
Type"circle"
Defaultundefined

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

NameDescription
--wj-checkbox-heightSpecifies the minimum height of the checkbox
--wj-checkbox-margin-bottomSize of the outer bottom edge
--wj-checkbox-margin-inlineSize of outer edges left and right
--wj-checkbox-margin-topSize of the outer upper edge
--wj-checkbox-widthSpecifies the minimum width of the checkbox

Slots

No slots available for this component.