Skip to content

Checkbox

Design guidelines

A checkbox is an input control that allows a user to select one or more options from a number of choices.

HTML
React
Angular
Label Help or instructional text goes here Optional help link Label
<certara-checkbox name="example" layout="stacked">
Label
<span slot="help">
Help or instructional text goes here
<certara-link target="_blank" right-icon="arrow-up-right-from-square" href="https://help.pinnacle21.net/en/articles/5157972-how-do-i-configure-studies">
Optional help link
</certara-link>
</span>
</certara-checkbox>
<certara-checkbox name="example" layout="stacked">Label</certara-checkbox>
import { CertaraCheckbox, CertaraLink } from '@certara/certara-ui-react';
<CertaraCheckbox name="example" layout="stacked">
Label
<span slot="help">
Help or instructional text goes here
<CertaraLink target="_blank" rightIcon="arrow-up-right-from-square" href="https://help.pinnacle21.net/en/articles/5157972-how-do-i-configure-studies">
Optional help link
</CertaraLink>
</span>
</CertaraCheckbox>
<CertaraCheckbox name="example" layout="stacked">Label</CertaraCheckbox>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-checkbox name="example" layout="stacked">
Label
<span slot="help">
Help or instructional text goes here
<certara-link target="_blank" right-icon="arrow-up-right-from-square" href="https://help.pinnacle21.net/en/articles/5157972-how-do-i-configure-studies">
Optional help link
</certara-link>
</span>
</certara-checkbox>
<certara-checkbox name="example" layout="stacked">Label</certara-checkbox>

checked

Attributechecked
Typeboolean
Defaultfalse
Requiredfalse
DescriptionThe checked state of the checkbox

disabled

Attributedisabled
Typeboolean
Defaultfalse
Requiredfalse
DescriptionThe disabled state of the checkbox

indeterminate

Attributeindeterminate
Typeboolean
Defaultfalse
Requiredfalse
DescriptionThe indeterminate state of the checkbox. Can only be set via JavaScript

inputType

Attributeinput-type
Type"checkbox" | "radio"
Default'checkbox'
Requiredfalse
DescriptionInternal prop to make a radio button. Best to use the certara-radio component directly

layout

Attributelayout
Type"inline" | "inline-block" | "stacked" | "standalone"
Default'inline'
Requiredfalse
DescriptionStacked checkboxes have one per line, inline checkboxes are all on the same line

name

Attributename
Typestring
Defaultundefined
Requiredfalse
DescriptionThe name of the checkbox

size

Attributesize
Type"md" | "sm"
Default'md'
Requiredfalse
DescriptionThe size of the checkbox

value

Attributevalue
Typeany
Default'on'
Requiredfalse
DescriptionThe value of the checkbox
NameDescriptionBubbles
certaraBlurStandard event emitted when checkbox is blurredtrue
certaraChangeStandard event emitted when checkbox is toggledfalse
certaraClickStandard event emitted when checkbox is clickedfalse
certaraFocusStandard event emitted when checkbox is focusedtrue

There are no public methods available for this component

NameDescription
Content for the label
helpHelp text that sits below the label
Label Help or instructional text goes here Optional help link Disabled Disabled selected
  • 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.
  • Keep checkbox labels short and descriptive.
  • Start all checkbox labels with a capital letter.
  • Don’t include punctuation after checkbox labels.
  • 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.
View component in Figma