Note: There are deprecated versions of this component. Switch to a version of the docs older than 10.0.x to view their docs.
Examples
Check out the Usage section for details about how and when to use the Checkbox
and CheckboxGroup
components.
Basic checkbox
The Checkbox
component can be used alone, outside of the CheckboxGroup
context.
<Checkbox label="This is a single checkbox" />
Basic checkboxes in checkbox group
The CheckboxGroup
component acts as container for a set of Checkbox
elements. You can choose to display or hide the label, but it is mandatory for the component's accessibility.
<CheckboxGroup label="This is a group">
<Checkbox label="option 1" />
<Checkbox label="option 2" />
</CheckboxGroup>
Group without label
You can hide the CheckboxGroup
label by setting the hideLabel
property to true
. This does not affect any of the other behaviors of the CheckboxGroup
element.
<CheckboxGroup
label="This is only for aria-label"
hideLabel={true}>
<Checkbox label="option 1" />
<Checkbox label="option 2" />
</CheckboxGroup>
Horizontal group
CheckboxGroup
allows the display of options in horizontal distribution by setting the horizontal
property to true
.
<CheckboxGroup
label="This is an horizontal group"
horizontal={true}>
<Checkbox label="option 1" />
<Checkbox label="option 2" />
</CheckboxGroup>
Checkbox and CheckboxGroup messages
Both components allow developers to show error messages. When set at the CheckboxGroup
level, errors are displayed below all options. However, when set at the Checkbox
level inside a CheckboxGroup
, the message is ignored and has no effect.
export function CheckboxMessages() {
const [validationMessages, setValidationMessages] = useState({});
const [groupValidationMessages, setGroupValidationMessages] = useState({});
const onChange = useCallback((e, newChecked) => {
setValidationMessages({});
setGroupValidationMessages({});
if (newChecked) {
setValidationMessages({ error: ['This is ignored'] });
setGroupValidationMessages({ error: ['Only second checkbox can be marked'] });
}
}, []);
return (
<CheckboxGroup
label="Do not select the forbidden option"
stateMessages={groupValidationMessages}
>
<Checkbox
label="Forbidden option"
onChange={onChange}
stateMessages={validationMessages}
/>
<Checkbox label="You can select this one" />
</CheckboxGroup>
);
}
}
Indeterminate state
Although this is not implemented as part of the Checkbox
component, the native behavior of an HTML input element is available. In this case, the indeterminate state can be set programmatically through JavaScript. A checkbox in the indeterminate state has a horizontal line in the box, instead of a check or tick. In the example below, the style is modified to make the option visible.
export function SetIndeterminateState() {
const onChange = useCallback((e, newCheck) => {
(document.getElementById('checkbox2') as HTMLInputElement).indeterminate =
newCheck;
}, []);
const style = { opacity: 100 };
return (
<CheckboxGroup label="Group of checkboxes">
<Checkbox
label="Set the next checkbox as 'indeterminate'"
onChange={onChange}
/>
<Checkbox
label="This is another checkbox"
id="checkbox2"
checked={false}
style={style}
/>
</CheckboxGroup>
);
}
Note: There are deprecated versions of this component. Switch to a version of the docs older than 10.0.x to view their docs.
Usage
Overview
Checkboxes enable users to select from a list of items. They often appear in forms, where there is a need to collect user information. When using checkboxes, users can select one or more items from a set.
For a detailed guide on when to use this component, explore the following UI component decision tree.
When to use
- Use the checkbox group when there are multiple options to select independently of each other.
- Use the checkbox group when a user needs to see all options in one place (without additional interactions).
- Use a single checkbox when there is only one option to select.
When not to use
- When an action must be applied instantly. Use the switch component instead.
- If a user can select only one option from a list. Use the radio group component instead.
- When there are 6 or more options from which users can choose. Use the dropdown component instead.
Source: Nielsen Norman Group
Do use radio buttons when only one option can be selected at a time.
Don't use checkboxes when only one option can be selected at a time.
Types
Checkboxes come in the form of a checkbox group or single checkbox.
Checkbox group
A checkbox group is a list of checkbox items under one group label. Users can select all items that are relevant under the group label. This format is useful when there are multiple valid options for a single instance.
Single checkbox
Jutro also accommodates checkboxes with a single item. Note that checkboxes can be used to turn an option on or off (for example, when enabling or disabling a setting).
 |
---|
Checkbox group (left) and single checkbox (right). |
Anatomy

The checkbox consists of the following elements:
- Checkbox group label: Explains the purpose of the checkbox group.
- Helper text (optional): Gives additional context for the checkbox group.
- Checkbox input: Indicates the appropriate state. By default it's unselected.
- Checkbox label: Describes the information that's going to be selected or unselected.
- Tooltip icon (optional): Serves to disambiguate the context for a given checkbox. The tooltip appears when hovered.
Alignment and placement
A checkbox group can be arranged vertically or horizontally depending on the page structure. By default, checkboxes are arranged vertically for easier reading.
As is the case with all input components, the label for the checkbox group can appear at the top (default) or on the left of the input itself.

Content
General writing guidelines
- Use sentence case for all aspects of designing Guidewire product interfaces. Don't use title case.
- Use present tense verbs and active voice in most situations.
- Use common contractions to lend your copy a more natural and informal tone.
- Use plain language. Avoid unnecessary jargon and complex language.
- Keep words and sentences short.
Label checkbox groups
Checkbox groups must have a label that describes what the list of options represents. A checkbox group without a label is ambiguous and not accessible.
Use the group label to state the category of the grouping or describe what actions to take below.
Do include a label that clearly describes what the list of options represents.
Don't assume that the options are self-explanatory without a label.
Use clear, consistent checkbox labels
- Try to make all labels in a checkbox group as parallel as possible. They should follow the same format and be approximately the same length.
- Use labels that are clear, concise, and unambiguous. Labels should describe options that are easy for average users to understand.
- Use positive and active wording for checkbox labels. Make it clear what will happen if the user checks a particular box, and what will happen if they leave it unchecked.
- Avoid negations such as "Don't send me email notifications". This would mean that the user would have to check the box in order for something not to happen.
- When asking the user for their consent, use the first person. For example, “I agree to the terms of service”.
Reference: Nielsen Norman
Do use parallel phrasing and try to keep the length about the same for all labels.
Don't use widely varied wording. This may slow down or even confuse users.
Keep checkbox labels concise
Limit the checkbox text label to a single line. We recommend using one to three words for checkbox labels.
Don't truncate checkbox labels with an ellipsis (...). If the label is too long for the horizontal space available, consider rewording it. You can also wrap long checkbox labels to a second line. This is preferable to truncation.
Do keep checkbox label text concise. If necessary, wrap to a second line.
Don't truncate checkbox label text with an ellipsis.
Use error text to guide users
Checkbox groups and checkboxes can include error messages to show that a selection is required to move forward, or that a selection that was made is invalid.
Use sentence case for error text. Write 1-2 short, complete sentences that end with a period.
Do use error text to guide the user and show them a solution.
Don't write ambiguous error messages or leave users guessing as to how to resolve a problem.
Mark required fields