HTML

Check

ExamplesDocumentationCSS Variables

Examples

Check example

Copied to clipboard

Documentation

Overview

The Check component is provided for use cases outside of forms. If it is used without label text ensure some sort of label for assistive technologies. (for example: aria-label)

If you extend this component or modify the styles of this component, then make sure any hover styles defined are applied to the clickable elements, like <input> or <label> since hover styles are used to convey the clickable target area of an element. To maximize the target area, use the example html where the <label> is the wrapping element.

Accessibility

Attribute Applied To Outcome
disabled <input type="checkbox"> Indicates that the element is unavailable and removes it from keyboard focus. Required when input is disabled

Usage

Class Applied To Outcome
.pf-c-check <div>, <label> Initiates the check component. Required
.pf-c-check__input <input type="checkbox"> Initiates a check input. Required
.pf-c-check__label <label>, <span> Initiates a label. Required
.pf-m-disabled .pf-c-check__label Initiates a disabled style for labels. Required when input is disabled

CSS Variables

--pf-c-check--GridGapc_check_GridGap0.5rem
--pf-c-check__input--MarginTopc_check__input_MarginTop-0.1875rem
--pf-c-check__label--Colorc_check__label_Color#72767b
--pf-c-check__label--FontSizec_check__label_FontSize1rem
--pf-c-check__label--FontWeightc_check__label_FontWeight400
--pf-c-check__label--LineHeightc_check__label_LineHeight1.3
--pf-c-check__label--disabled--Colorc_check__label_disabled_Color#72767b