Skip to main content

Checkbox

shadow

Checkbox, alebo tiež začiarkavacie políčko, je element, ktorý umožňuje používateľom vybrať jednu alebo viac možností z množiny. Kliknutím na checkbox zmeníte jeho stav na true alebo false.

Základné použitie

Placement End

Color

Indeterminate checkbox

Po pridaní atribútu indeterminate sa zobrazí checkbox, ktorého predvolený stav je neutrálny, tzn. ani true ani false.

Variant

Pridaní atribútu variant s hodnotou circle zobrazíte checkbox v okrúhlom tvare.

Atribúty a Vlastnosti

checked

DescriptionIf true, the checkbox is activated.
Attributechecked
Typeboolean
Defaultfalse

color

DescriptionThe color to use from your application's color palette. The default options are "primary", "success", "warning", "danger", "complete", and "dark". For more information on colors, visit Customization Basics.
Attributecolor
Type"complete" | "danger" | "dark" | "primary" | "success" | "warning" | string | undefined
Defaultundefined

disabled

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

name

DescriptionDefines a name attribute that is important, for example, when used in forms.
Attributename
Typestring
Defaultthis.inputId

placement

DescriptionDisplays a checkbox after the description.
Attributeplacement
Typeany
Default``

Eventy

NameDescription
changeCalled when the element state changes.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
inputRefers to an input element of type checkbox
checkboxRefers to the inner div wrapping element

CSS Custom Vlastnosti

NameDescription
--wj-checkbox-border-radiusBorder radius of the checkbox
--wj-checkbox-color-baseBackground of the checkbox handle
--wj-checkbox-handle-border-radiusBackground of the checkbox handle when checked
--wj-checkbox-handle-colorBorder radius of the checkbox handle
--wj-checkbox-handle-heightBox shadow of the checkbox handle
--wj-checkbox-handle-shadowHeight of the checkbox handle
--wj-checkbox-handle-shadow-checkedMaximum height of the checkbox handle
--wj-checkbox-handle-widthHorizontal spacing around the checkbox handle
--wj-checkbox-heightTransition of the checkbox handle
--wj-checkbox-widthWidth of the checkbox handle

Sloty

NameDescription
``The default location of the element content.