bg-slate :Tailwind CSS Background Color class

The bg-slate class sets the background color to one of Tailwind slate shades.


Interactive Background Playground

Try each class live and inspect the CSS output.

Utility class
bg-slate
CSS output
background-color: rgb(100 116 139);

bg-slate (Slate Background)

The bg-slate class sets the background color to one of Tailwind's "slate" shades, such as bg-slate-500. This provides a grayish tone often used for neutral or elegant designs.

Example Usage

HTML
1<div class="flex flex-col items-center space-y-5 p-8 rounded-t-md">
2 <div class="bg-slate-50 text-gray-500 border p-4 rounded-md text-center w-80">
3 bg-slate-50
4</div>
5<div class="bg-slate-100 text-gray-500 border p-4 rounded-md text-center w-80">
6 bg-slate-100
7</div>
8<div class="bg-slate-200 text-gray-500 border p-4 rounded-md text-center w-80">
9 bg-slate-200
10</div>
11<div class="bg-slate-300 text-gray-500 border p-4 rounded-md text-center w-80">
12 bg-slate-300
13</div>
14<div class="bg-slate-400 text-white border p-4 rounded-md text-center w-80">
15 bg-slate-400
16</div>
17
18 <div class="bg-slate-500 text-white p-4 rounded-md text-center w-80">
19 bg-slate-500
20</div>
21<div class="bg-slate-600 text-white border p-4 rounded-md text-center w-80">
22 bg-slate-600
23</div>
24<div class="bg-slate-700 text-white border p-4 rounded-md text-center w-80">
25 bg-slate-700
26</div>
27<div class="bg-slate-800 text-white border p-4 rounded-md text-center w-80">
28 bg-slate-800
29</div>
30<div class="bg-slate-900 text-white border p-4 rounded-md text-center w-80">
31 bg-slate-900
32</div>
33<div class="bg-slate-950 text-white border p-4 rounded-md text-center w-80">
34 bg-slate-950
35</div>
36</div>

Preview

bg-slate-50

bg-slate-100

bg-slate-200

bg-slate-300

bg-slate-400

bg-slate-500

bg-slate-600

bg-slate-700

bg-slate-800

bg-slate-900

bg-slate-950

How to Use

Add the bg-slate class directly to your HTML element:

HTML
1<div class="bg-slate">
2 <!-- Your content here -->
3</div>

Responsive Usage

Use Tailwind's responsive prefixes to apply bg-slate at specific breakpoints:

HTML
1<div class="sm:bg-slate md:bg-slate lg:bg-slate">
2 Responsive element
3</div>
  • sm:bg-slate — applies from 640px and up
  • md:bg-slate — applies from 768px and up
  • lg:bg-slate — applies from 1024px and up

Customization

You can extend or override this utility in your tailwind.config.js. See the Tailwind CSS documentation for details on customizing your theme.

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates