← Back to site

Center

The Center component horizontally centers its children. Multiple children are stacked vertically with consistent spacing.

Import

import Center from '@mdx/Center.astro';

Props

PropTypeDefaultDescription
classstringAdditional CSS classes

Content is passed as a slot (children).

Live Example

Implementation Notes

Renders a <div> with flex flex-col items-center gap-4 w-full max-w-full. Purely a layout utility with no interactivity.

Source: src/components/mdx/Center.astro