Last updated: 28 January 2026

Tailwind CSS Border Style

Set border styles in Tailwind CSS with border-solid, border-dashed, border-dotted, border-double, and border-none utilities. Includes divider and separator patterns.


Interactive Border Style Playground

Try each class live and inspect the CSS output.

Utility class
border-solid border-4
CSS output
border-style: solid;

In Tailwind CSS, the border-style property is used to define the style of the border around an element. There are several styles available, including solid, dashed, dotted, double, and none.

How to apply Tailwind Border Style

In Tailwind CSS, you can apply a border style to an element using the border-{style} utility, where {style} is the border style. For example, to apply a solid border, you would use the border-solid class as shown below:

HTML
1<div class="border border-solid">This div has a solid border.</div>

This div has a solid border

For example, to give a div a dashed border:

HTML
1<div class="border border-dashed">This div has a dashed border.</div>

This div has a dashed border

For example, to give a div a dotted border:

HTML
1<div class="border border-dotted">This div has a dotted border.</div>

This div has a dotted border

For example, to give a div a double border:

HTML
1<div class="border border-double">This div has a double border.</div>

This div has a double border

For example, to give a div a none border:

HTML
1<div class="border border-none">This div has a none border.</div>

This div has a none border

Customizing Tailwind Border Styles

Tailwind CSS allows you to customize border styles using the tailwind.config.js file. You can extend the default configuration and define your own custom border styles.

Here's an example of how to add a new border style:

JSX
1// tailwind.config.js
2module.exports = {
3 variants: {
4 extend: {
5 // ...
6 borderStyle: ["hover", "focus"],
7 },
8 },
9};
HTML
1<div class="border border-hover">This div has a hover border.</div>

Tailwind CSS Border Style

ClassProperties
border-solidborder-style: solid;
border-dashedborder-style: dashed;
border-dottedborder-style: dotted;
border-doubleborder-style: double;
border-noneborder-style: none;

✨ What's Next?

Now that you’ve mastered Tailwind CSS Border Style, try experimenting with:

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