Center

Renders a centred layout.

Read more Read less

The default spacing is md.

Examples

<.center space="base">
  <.box padding="xs" border="sm">
    <.p>
      Centered Box with Paragraph.
      Elements on this page will have the `.gc-gap-base` class.
    </.p>
  </.box>
</.center>

<.center space="lg">
  <.box padding="xs" border="sm">
    <.p>
      Centered Box with Paragraph.
      Elements on this page will have the `.gc-gap-lg` class.
    </.p>
  </.box>
</.center>

Centered Header

Centered Box with Paragraph

Standalone Paragraph within the Center layout

Attribute Type Documentation Default Value
class :any

User provided class

[]
Required space * :string
rest :global
tag :string "div"
Required inner_block * :slot
<.h1>Centered Header</.h1>
<.box padding="xs" border="sm">
<.p>Centered Box with Paragraph</.p>
</.box>
<.p>Standalone Paragraph within the Center layout</.p>