Container
Container
creates a CSS Container with inline-size
.
-->
Container
creates a CSS Container with inline-size
.
No need to declare container-type
all the time. Just use Container
in a parent element and you’ll enable container queries for all children elements
Want to make your component change orientation when the container is wider than 400px
? Just use @bp4
which creates a breakpoint at 400px
— courtesy of our Tailwind Layout Preset.
Use Container
whenever you need to create a CSS Container.
If you use Container
with Macro layouts like SimpleGrid
, put Container
on each grid item so your components can benefit from container queries and container units.
You can use container queries once you add Container
to an ancestor element.
For the Tailwind code to work, you must be using Tailwind’s container queries plugin which already included in our Tailwind Layout Preset.
You can configure the breakpoints for container queries in your tailwind.config.js
file. Please refer to the Tailwind Container Query docs for more information.
We recommend you to use our Layouts Preset because we’ve added a few extra container breakpoints for you.
Tailwind does not support max-width
container queries in their plugin. We did not add support for them too at this point.
You can use container query units once you have a Container
active in an ancestor element.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Use Container
whenever you need to create a CSS Container.
If you use Container
with Macro layouts like SimpleGrid
, put Container
on each grid item so your components can benefit from container queries and container units.
You can use container queries once you add Container
to an ancestor element.
For the Tailwind code to work, you must be using Tailwind’s container queries plugin which already included in our Tailwind Layout Preset.
You can configure the breakpoints for container queries in your tailwind.config.js
file. Please refer to the Tailwind Container Query docs for more information.
We recommend you to use our Layouts Preset because we’ve added a few extra container breakpoints for you.
Tailwind does not support max-width
container queries in their plugin. We did not add support for them too at this point.
You can use container query units once you have a Container
active in an ancestor element.
Here’s the CSS for Container
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Here’s the CSS for Container
Variant | Description |
---|---|
@<breakpoint>:<class> | Creates a min-width breakpoint at <breakpoint> |
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Variant | Description |
---|---|
@<breakpoint>:<class> | Creates a min-width breakpoint at <breakpoint> |