@jagaad/tailwind-bootstrap-grid
This is a fork of karolis-sh/tailwind-bootstrap-grid
A PR was created in original repository with same functionality
Bootstrap v5 flexbox grid system as a Tailwind CSS plugin.
Check the demo.
Installation
npm i -D @jagaad/tailwind-bootstrap-grid
In tailwind.js
file:
module.exports = {
plugins: [
require('@jagaad/tailwind-bootstrap-grid')({
containerMaxWidths: { sm: '540px', md: '720px', lg: '960px', xl: '1140px' },
}),
],
};
And don't forget to include components
and utilities
in your tailwind base
css file:
@tailwind base;
@tailwind components;
@tailwind utilities;
This will generate Bootstrap v5 flexbox grid.
* NOTE: When using the .container
class from this plugin
you will need to disable
the core container plugin from
your tailwind config file as both plugins expose a .container
class.
module.exports = {
corePlugins: {
container: false,
},
};
Features & Tailwind CSS options support
- ✅ custom screens
- ✅ custom separator
- ✅ custom prefix
- ✅ important
- ✅ rtl support
Options
FAQ
- Why my
.container
doesn't have padding? This plugin will not work properly
with core container plugin as both
plugins expose a .container
class. - How to use rtl css? Set the
ltr
or rtl
dir
attribute on your container (usually the root html
). - Is there a Bootstrap v4 grid implementation? Yes, use
tailwind-bootstrap-grid@3
.
Related
postcss-bootstrap-4-grid