Theo's Typesafe CultTTC
Theo's Typesafe Cult•3y ago•
9 replies
pradeep800

responsiveness with object using tailwind

hello guys i am trying to achieve responsiveness in tailwind with the help of js object
example:-
const className={
sm:"bg-blue-300",
md:"bg-red-500",
}

will be converted on
const convertedClassName="sm:bg-blue-300 md:bg-red-500"

because of dynamic class name (https://tailwindcss.com/docs/content-configuration#dynamic-class-names) i cannot write a function in javascript can anyone suggest me library which do the same thing or anything which will help me to remove this problem
Configuring the content sources for your project.
Content Configuration - Tailwind CSS
Was this page helpful?