Blockcomponent

Block({ as: Element = "div", children, ...props }: BlockProps): ReactElement
ParamType
propsBlockProps
Props for Block — colour, space, typography, and width variants plus an optional as element override. required
    .asBlockElement
Element this <Block> renders as, e.g. "header" to output a "<header>" Defaults to "div"
Return
ReactElement

Plain <div> block with block-level spacing.

  • Pass as to render a different semantic element (section, header, footer, nav, aside, figure).

Examples

<Block><Paragraph>Hello</Paragraph></Block>
<Block as="aside" width="narrow"><Paragraph>Sidebar</Paragraph></Block>