Using Grommet for HPE?See CheckBox examples and guidance.
string
"a user friendly label for screen readers"
function
({ checked, indeterminate }) => <Box ...>{...}</Box>
Same as React <input disabled={} />. Also adds a hidden input element with the same name so form submissions work.
boolean
true
false
boolean
true
false
boolean
true
false
string
"enabled"
element
<Box>...</Box>
Function that will be called when the user clicks the check box. It will be passed a React event object. The current state can be accessed via event.target.checked. Same as React <input onChange={} />.
function
() => {}
string
"none"
"xxsmall"
"xsmall"
"small"
"medium"
"large"
"xlarge"
"any CSS size"
object
{ vertical: "...", horizontal: "...", top: "...", bottom: "...", left: "...", right: "...", start: "...", end: "..." }
At its core, the CheckBox component is a regular <input> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for input elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.
Also, feel free to read about the types of React events available, or see how DOM attributes change in React. Working in tandem with Styled Components, you also have access to the as property.
string
"black"
object
{ dark: 'rgba(255, 255, 255, 0.5)', light: 'rgba(0, 0, 0, 0.15)' }
string
css`color: 'blue'`
function
(props) => {}
string
"brand"
object
{ dark: "string", light: "string" }
string
css`color: 'blue'`
function
(props) => {}
string
"none"
"xsmall"
"small"
"medium"
"large"
"xlarge"
"any CSS size"
string
"brand"
object
{ dark: "string", light: "string" }
string
"brand"
object
{ dark: "string", light: "string" }
string
css`color: 'blue'`
function
(props) => {}
string
css`color: 'blue'`
function
(props) => {}
string
"none"
"xxsmall"
"xsmall"
"small"
"medium"
"large"
"xlarge"
"any CSS size"
object
{ vertical: "...", horizontal: "...", top: "...", bottom: "...", left: "...", right: "...", start: "...", end: "..." }
string
"brand"
object
{ dark: "string", light: "string" }
string
"#d9d9d9"
object
{ dark: "#d9d9d9", light: "#d9d9d9" }
string
css`color: 'blue'`
function
(props) => {}
string
css`color: 'blue'`
function
(props) => {}
string
"none"
"xxsmall"
"xsmall"
"small"
"medium"
"large"
"xlarge"
"any CSS size"
object
{ vertical: "...", horizontal: "...", top: "...", bottom: "...", left: "...", right: "...", start: "...", end: "..." }