Version 0.8.2 - Alpha
Checkbox
component

Checkbox

A checkbox component that can be used to trigger actions.

Usage

import { Checkbox } from '@backstage/ui';

<Checkbox>Accept terms</Checkbox>

API reference

PropTypeDefaultResponsive
children
React.ReactNode
-No
isSelected
boolean
-No
defaultSelected
boolean
-No
onChange
(isSelected: boolean) => void
-No
isDisabled
boolean
-No
isRequired
boolean
-No
name
string
-No
value
string
-No
className
string
-No
style
CSSProperties
-No

Examples

All variants

Here's a view when checkboxes have different variants.

<Flex direction="column" gap="2">
  <Checkbox>Unchecked</Checkbox>
  <Checkbox isSelected>Checked</Checkbox>
  <Checkbox isDisabled>Disabled</Checkbox>
  <Checkbox isSelected isDisabled>Checked & Disabled</Checkbox>
</Flex>

Theming

Our theming system is based on a mix between CSS classes, CSS variables and data attributes. If you want to customise this component, you can use one of these class names below.

Changelog