DEV Community

Cover image for How to design Unique shapes using TailwindCSS
Darpan Vithani for Canopas Software

Posted on

How to design Unique shapes using TailwindCSS

CSS is used for more than just styling elements. CSS shapes enable web designers to create custom paths such as triangles, circles, and polygons. ⚪️, 🔷, 🔺, ⭐️, ◾️.

This way, you’re not forced to insert a transparent-background floating image only to be disappointed by a rectangular box around it.

This article will design various shapes using TailwindCSS and a few functional shapes and values.

Tailwind CSS can be used to create various shapes using its pre-defined classes.

You can make shapes such as circles, squares, triangles, and more using the .rounded-* classes for rounded shapes and the .w-* and .h-* classes for width and height.

Additionally, you can create shapes using the :before and :after pseudo-elements with the content property set to an empty string and the border property set to create the desired shape.

And you’ll see how simple a task like this can be if you sharpen your skills and practice regularly.

For a detailed implementation guide, check out our canopas blog.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (1)

Collapse
 
vincentdorian profile image
Vincent

I really like this article! Awesome stuff. 🎉

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay