@bedrock-layout/center v3.2.13
@bedrock-layout/center
A layout helper component that centers the content
Full docs at: bedrock-layout.dev
When to Use
Use the Center
component when you want to center the content and clamp it at the desired width, and can also center the children and text alignment.
How to install
npm install @bedrock-layout/center
or
yarn add @bedrock-layout/center
Usage
import { Center } from '@bedrock-layout/center';
<Center>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
</Center>;
data-attribute
For styling purposes, you can select data-bedrock-center
.
API
Property | Description | Type | Default |
---|---|---|---|
maxWidth | Max width of the content | number, string | medium (1023px) |
centerText | Center align the text | boolean | false |
centerChildren | Center align the child components | boolean | false |
3 months ago
6 months ago
8 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago