Components
Center
Component to center its children horizontally.
The <Center> is a layout component that centers its children horizontally within a container.
Usage
You can use it to center a single child or a list of children. The maxWidth prop sets the maximum width of the container
and the space prop adds spacing between the children elements.
The <Center> component can also be used with components like <Text>, <Stack> or <Inline> component.
import { Center } from '@marigold/components';import { Rectangle } from '@/ui/Rectangle';export default () => ( <Center maxWidth="xxlarge" space={1}> <Rectangle height="50px" width="300px" /> <Rectangle height="50px" width="300px" /> <Rectangle height="50px" width="300px" /> </Center>);Props
Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
Center
Prop
Type
Related
Last update: a month ago