DEV Community

Agik Setiawan
Agik Setiawan

Posted on

5 1

Use Tailwind CSS in existing Bootstrap project without crash classes

Just add prefix 'tw' in 'tailwind.config.js'

like this

module.exports = {
  prefix: 'tw-',
  content: [
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Enter fullscreen mode Exit fullscreen mode

now you can use Tailwind CSS class with prefix 'tw' without crash with bootstrap classes

Example use:
tw-bg-red-400
tw-p2

you can change 'tw' prefix with another prefix that you want.

Top comments (0)

PulumiUP 2025 image

PulumiUP 2025: Cloud Innovation Starts Here

Get inspired by experts at PulumiUP. Discover the latest in platform engineering, IaC, and DevOps. Keynote, demos, panel, and Q&A with Pulumi engineers.

Register Now

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay