The following is an demonstration of every type of utility provided by tailwindcss-logical. You can read about installation, configuration, and more in the project's README.
This page is entirely styled with Tailwind classes, from a mostly unmodified Tailwind config file. To achieve better browser support, tailwindcss-logical's styles are run through some additional PostCSS plugins. Read more about browser compatibility.
To see how these utilities enable multi-directional layouts, click the Switch Text Direction button! All it does is flip the dir
attribute on the <html>
element from "ltr"
to "rtl"
and back again, and the rest is handled through the magic of logical properties and values.
Block Size
Border Color
- Can I useā¦
border-block-color
- Can I useā¦
border-inline-color
- Can I useā¦
border-block-start-color
- Can I useā¦
border-block-end-color
- Can I useā¦
border-inline-start-color
- Can I useā¦
border-inline-end-color
Border Radius
- Can I useā¦
border-start-start-radius
- Can I useā¦
border-start-end-radius
- Can I useā¦
border-end-start-radius
- Can I useā¦
border-end-end-radius
Border Width
- Can I useā¦
border-block-width
- Can I useā¦
border-inline-width
- Can I useā¦
border-block-start
- Can I useā¦
border-block-end
- Can I useā¦
border-inline-start
- Can I useā¦
border-inline-end
Divide Width
These use the Flow-relative Border Width properties. See Border Width Utilities for browser support details.
divide-i
divide-i-4
divide-i-4 + divide-i-reverse (with flex-row-reverse)
divide-b
divide-b-4
divide-b-4 + divide-b-reverse (plus flex-col-reverse)
Float and Clear
- Can I useā¦
float: inline-start
andfloat: inline-end
- Can I useā¦
clear: inline-start
andclear: inline-end
Inline Size
Inset
- Can I useā¦
inset-block
- Can I useā¦
inset-inline
- Can I useā¦
inset-block-start
- Can I useā¦
inset-block-end
- Can I useā¦
inset-inline-start
- Can I useā¦
inset-inline-end
Margin
- Can I useā¦
margin-block
- Can I useā¦
margin-inline
- Can I useā¦
margin-block-start
- Can I useā¦
margin-block-end
- Can I useā¦
margin-inline-start
- Can I useā¦
margin-inline-end
Overscroll Behavior
overscroll-b-auto
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pharetra tortor non augue lacinia, vel tempus nunc pellentesque. Nulla et posuere lectus. Suspendisse ac magna at dolor luctus placerat. Suspendisse porttitor fermentum nibh non porttitor. Morbi turpis ipsum, porttitor sit amet leo at, aliquet aliquet nibh.
overscroll-b-contain
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pharetra tortor non augue lacinia, vel tempus nunc pellentesque. Nulla et posuere lectus. Suspendisse ac magna at dolor luctus placerat. Suspendisse porttitor fermentum nibh non porttitor. Morbi turpis ipsum, porttitor sit amet leo at, aliquet aliquet nibh.
overscroll-b-none
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pharetra tortor non augue lacinia, vel tempus nunc pellentesque. Nulla et posuere lectus. Suspendisse ac magna at dolor luctus placerat. Suspendisse porttitor fermentum nibh non porttitor. Morbi turpis ipsum, porttitor sit amet leo at, aliquet aliquet nibh.
overscroll-i-auto
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu.
overscroll-i-contain
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu.
overscroll-i-none
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sagittis magna neque, ultricies tempus est mollis eu.
Padding
- Can I useā¦
padding-block
- Can I useā¦
padding-inline
- Can I useā¦
padding-block-start
- Can I useā¦
padding-block-end
- Can I useā¦
padding-inline-start
- Can I useā¦
padding-inline-end
Resize
Space Between
- These use the Flow-relative Margin properties. See Margin Utilities for browser support details.
space-i-2
space-i-8
space-i-8 + space-i-reverse (with flex-row-reverse)
space-b-2
space-b-8
space-b-8 + space-b-reverse (plus flex-col-reverse)
Text Align
text-start
text-end
Ready to get started? Check out the README for more info on usage and configuration.