<link href="https://unpkg.com/tailwindcss@^2.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" />
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
fontFamily: {
sans: ["Ubuntu "],
serif: ["Ubuntu "],
mono: ["Ubuntu "],
},
extend: {},
},
plugins: [],
};
// Tailwind npm
> npm install -D tailwindcss
> npx tailwindcss init
// Tailwind PostCSS
> npm install -D tailwindcss postcss autoprefixer
> npx tailwindcss init
// or by link bootstrap
<script src="https://cdn.tailwindcss.com"></script>
// Happy coding :)
.card-black {
@apply card bg-black border-gray-400 text-gray-500;
}
.card-blue {
@apply card bg-blue-200 border-blue-400 text-blue-700;
}
.card-gray {
@apply card bg-gray-200 border-gray-400 text-gray-700;
}
.card-green {
@apply card bg-green-200 border-green-400 text-green-700;
}
.card-indigo {
@apply card bg-indigo-200 border-indigo-400 text-indigo-700;
}
.card-orange {
@apply card bg-orange-200 border-orange-400 text-orange-700;
}
.card-pink {
@apply card bg-pink-200 border-pink-400 text-pink-700;
}
.card-purple {
@apply card bg-purple-200 border-purple-400 text-purple-700;
}
.card-red {
@apply card bg-red-200 border-red-400 text-red-700;
}
.card-teal {
@apply card bg-teal-200 border-teal-400 text-teal-700;
}
.card-transparent {
@apply card bg-transparent border-gray-400 text-gray-600;
}
.card-white {
@apply card bg-white border-gray-400 text-gray-700;
}
.card-yellow {
@apply card bg-yellow-200 border-yellow-400 text-yellow-700;
}
<figure class="bg-slate-100 rounded-xl p-8 dark:bg-slate-800">
<img class="w-24 h-24 rounded-full mx-auto" src="/sarah-dayan.jpg" alt="" width="384" height="512">
<div class="pt-6 space-y-4">
<blockquote>
<p class="text-lg font-medium">
“Tailwind CSS is the only framework that I've seen scale
on large teams. It’s easy to customize, adapts to any design,
and the build size is tiny.”
</p>
</blockquote>
<figcaption class="font-medium">
<div class="text-sky-500 dark:text-sky-400">
Sarah Dayan
</div>
<div class="te>
Staff Engineer, Algolia
</div>
</figcaption>
</div>
</figure>
<div class="space-y-4">
<div class="w-96 bg-white shadow rounded">
w-96
</div>
<div class="w-80 bg-white shadow rounded">
w-80
</div>
<div class="w-72 bg-white shadow rounded">
w-72
</div>
<div class="w-64 bg-white shadow rounded">
w-64
</div>
<div class="w-60 bg-white shadow rounded">
w-60
</div>
<div class="w-56 bg-white shadow rounded">
w-56
</div>
<div class="w-52 bg-white shadow rounded">
w-52
</div>
<div class="w-48 bg-white shadow rounded">
w-48
</div>
</div>
It's an css framework which is used in Apple, Tesla etc
trertretrt