Open In App

How to use the skew and skew-y Classes in Tailwind CSS ?

Last Updated : 05 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

In Tailwind CSS, the skew-x-[amount] and skew-y-[amount] classes are used to apply skew transformations to elements. These classes allow you to skew an element along the x-axis or y-axis, creating visually interesting effects.

Syntax

<div class="skew-x-12">
Skewed along the x-axis
</div>
<div class="skew-y-[-8]">
Skewed along the y-axis
</div>

Preview:

Class Description
skew-x-[amount] Applies a skew transformation along the x-axis. Replace [amount] with the desired angle or identifier.
skew-y-[amount] Applies a skew transformation along the y-axis. Replace [amount] with the desired angle or identifier.

Key Features:

  • Angle Values: Specify angle values like [-12] or [8] to control the skew degree.
  • Customization: Easily integrate skew transformations into your design without writing custom CSS.
  • Visual Interest: Skew transformations can be used to create visually dynamic layouts.
  • Responsive Design: Utilize responsive variants (sm:, md:, lg:, xl:) for adaptive skew effects.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads