Checkbox
A checkbox is an input control that allows a user to select one or more options from a number of choices.
certara-checkbox
Section titled “certara-checkbox”Properties
Section titled “Properties”checked
| Attribute | checked |
| Type | boolean |
| Default | false |
| Required | false |
| Description | The checked state of the checkbox |
disabled
| Attribute | disabled |
| Type | boolean |
| Default | false |
| Required | false |
| Description | The disabled state of the checkbox |
indeterminate
| Attribute | indeterminate |
| Type | boolean |
| Default | false |
| Required | false |
| Description | The indeterminate state of the checkbox. Can only be set via JavaScript |
inputType
| Attribute | input-type |
| Type | "checkbox" | "radio" |
| Default | 'checkbox' |
| Required | false |
| Description | Internal prop to make a radio button. Best to use the certara-radio component directly |
layout
| Attribute | layout |
| Type | "inline" | "inline-block" | "stacked" | "standalone" |
| Default | 'inline' |
| Required | false |
| Description | Stacked checkboxes have one per line, inline checkboxes are all on the same line |
name
| Attribute | name |
| Type | string |
| Default | undefined |
| Required | false |
| Description | The name of the checkbox |
size
| Attribute | size |
| Type | "md" | "sm" |
| Default | 'md' |
| Required | false |
| Description | The size of the checkbox |
value
| Attribute | value |
| Type | any |
| Default | 'on' |
| Required | false |
| Description | The value of the checkbox |
Events
Section titled “Events”| Name | Description | Bubbles |
|---|---|---|
certaraBlur | Standard event emitted when checkbox is blurred | true |
certaraChange | Standard event emitted when checkbox is toggled | false |
certaraClick | Standard event emitted when checkbox is clicked | false |
certaraFocus | Standard event emitted when checkbox is focused | true |
Methods
Section titled “Methods”There are no public methods available for this component
| Name | Description |
|---|---|
| Content for the label | |
help | Help text that sits below the label |
Design guidelines
Section titled “Design guidelines”Variants
Section titled “Variants” In practice
Section titled “In practice”Checkboxes should:
Section titled “Checkboxes should:”- Work independently from each other. Selecting one checkbox shouldn’t change the selection status of another checkbox in the list. The exception is when a checkbox is used to make a bulk selection of multiple items.
- Be framed positively. For example, say “Show file path for uploaded data” instead of “Hide file path for uploaded data”.
- Always have a label when used to activate or deactivate a setting.
- Be listed according to a logical order, whether it’s alphabetical, numerical, time-based, or some other clear system.
- Link to more information or include a subtitle as required to provide more explanation. Don’t rely on tooltips to explain a checkbox.
Content guidelines
Section titled “Content guidelines”Labels
Section titled “Labels”- Keep checkbox labels short and descriptive.
- Start all checkbox labels with a capital letter.
- Don’t include punctuation after checkbox labels.
Accessibility
Section titled “Accessibility”Keyboard support
Section titled “Keyboard support”- Move focus to each checkbox using the tab key (or shift + tab when tabbing backwards).
- To interact with the checkbox when it has keyboard focus, press the space key.