Skip to content

Border Style

Set border styles on individual sides. TailwindCSS v4 provides border-solid, border-dashed, etc. for all four sides at once, but doesn't expose per-side control — this module fills that gap.

Import

Included in @import 'tw-jib-css'. To import individually:

css
@import 'tw-jib-css/border-style';

Quick Reference

Class Styles
border-t-solidborder-top-style: solid
border-t-dashedborder-top-style: dashed
border-t-dottedborder-top-style: dotted
border-t-doubleborder-top-style: double
border-t-grooveborder-top-style: groove
border-t-ridgeborder-top-style: ridge
border-t-insetborder-top-style: inset
border-t-outsetborder-top-style: outset
border-t-noneborder-top-style: none
border-t-hiddenborder-top-style: hidden
border-r-<style>border-right-style: <style>
border-b-<style>border-bottom-style: <style>

Basic Usage

Apply different border styles to individual sides:

border-t-dashed
border-b-dotted
border-l-double

Mixed styles

Combine multiple per-side styles for decorative effects:

Different style on each side

Available Styles

solid
dashed
dotted
double
groove
ridge
inset
outset

Side Variants

PrefixSidesCSS Property
tTopborder-top-style
rRightborder-right-style
bBottomborder-bottom-style
lLeftborder-left-style
xLeft + Rightborder-inline-style
yTop + Bottomborder-block-style
sInline startborder-inline-start-style
eInline endborder-inline-end-style

Axis variants

border-x-dashed
border-y-dotted

Logical variants

The logical variants (s and e) respect writing direction — in LTR layouts, s is left and e is right. In RTL, they swap.

border-s-double
border-e-ridge

Applying conditionally

Hover and focus states

Prefix a border style utility with a state variant like hover:* to only apply it in that state:

Hover to change top border to dashed