Box
A low-level utility component that accepts styles to enable custom theme-aware styling
- Beta
- Not reviewed for accessibility
import {Box} from '@primer/react'
Use Box to create flexbox layouts.
Use Box to create grid layouts.
Name | Type | Default | Description |
---|---|---|---|
ref | React.RefObject<HTMLDivElement> | A ref to the element rendered by this component. Because this component is polymorphic, the type will vary based on the value of the as prop. | |
as | React.ElementType | "div" | The underlying element to render — either a HTML element name or a React component. |
sx | SystemStyleObject | Style overrides to apply to the component. See also overriding styles. |