Skip to main content

Checkbox

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

Placement End

Color

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 checkbox is marked.
Attributechecked
Typeboolean
Defaultfalse

disabled

DescriptionIf true, the checkbox is disabled.
Attributedisabled
Typeboolean
Defaultfalse

value

DescriptionThe value of the check box.
Attributevalue
Typeboolean
Defaultfalse

indeterminate

DescriptionIf true, the checkbox is in an indeterminate state.
Attributeindeterminate
Typeboolean
Defaultfalse

name

DescriptionThe name of the checkbox to submit the form.
Attributename
Typestring
Defaultundefined

color

DescriptionCheckbox colour. Can be "primary", "complete", "success", "warning", "warning", or "info".
Attributecolor
Type"primary." | "complete" | "success" | "warning" | "danger" | "info" | string | undefined
Defaultundefined

placement

DescriptionThe location of the checkbox relative to the text. Can be "end".
Attributeplacement
Type"end" | undefined
Defaultundefined

Option

DescriptionCheckbox variant. Can be "circle".
AttributeOption
Type"circle" | undefined
Defaultundefined

Events

NameDescription
wje-toggle:inputCalled when the status of the checkbox changes (input event).
wje-toggle:changeFired when the checkbox state changes (change event).

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeRefers to the native wrapper element of the checkbox

CSS Custom Properties

NameDescription
--wje-checkbox-border-radiusRadius of roundness of the corners of the check box
--wje-checkbox-border-widthCheckbox border width
--wje-checkbox-border-styleCheckbox border style
--wje-checkbox-border-colorCheckbox border colour
--wje-checkbox-margin-topTop indentation of checkbox
--wje-checkbox-margin-bottomLower indentation of the checkbox
--wje-checkbox-margin-inlineSide offset checkbox
--wje-checkbox-sizeCheckbox size
--wje-checkbox-checkmarkCheck icon in the checkbox
--wje-checkbox-interminateIndeterminate checkbox status icon

Slots

NameDescription
``The contents of the checkbox label.