Container
The container centers your content horizontally. It's the most basic layout element.
Fixed Container
Fixed container is a responsive, fixed-width container, meaning its max-width
changes at each breakpoint.
<Container>{/* Your content */}</Container>
Fluid Container
Fluid container is a full width container, spanning the entire width of the viewport.
<Container fluid>{/* Your content */}</Container>
Breakpoints and Containers
The table below illustrates how each container’s max-width
compares to the original fixed and fluid across each breakpoint.
Breakpoint | Dimensions | Fixed Container | Fluid Container |
---|---|---|---|
xxs | < 520 | 100% | 100% |
xs | 520 - 767 | 100% | 100% |
sm | 768 - 959 | 100% | 100% |
md | 960 - 1023 | 768px | 100% |
lg | 1024 - 1365 | 960px | 100% |
xlg | ≥ 1366 | 1184px | 100% |
API
Learn more about the properties and the customization points.
Usage
import Container from "@sonnat/ui/Container";//orimport { Container } from "@sonnat/ui";
Properties
Note that the documentation avoids mentioning all the native props (there are a lot) in this section of the components.
Name | Type | Default | Description |
---|---|---|---|
children | node | - | The content of the container. |
className | string | - | Append to the class names applied to the component so you can override or extend the styles. |
noPadding | boolean | false | If true , the paddings will be removed. |
fluid | boolean | "xss" | "xs" | "sm" | "md" | "lg" | "xlg" | false | Determines whether the container should be fluid or not. If true , the container will be fluid in all breakpoints.If false , the container will be fixed.If set to breakpoint ("xxs", "xs" and etc.), It will be fluid container in that breakpoint and wider screens. |
|