npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@toolwind/corner-shape

v0.0.8-3

Published

Toolwind Corner Shape provides simple utilities for applying corner shapes to elements in Tailwind CSS.

Readme

minified size license version twitter

Tailwind CSS plugin that adds first-class utilities for the CSS corner-shape property and its per-corner longhands (e.g. corner-top-left-shape). It supports static keywords like round, scoop, bevel, notch, square, squircle, as well as the functional value superellipse(<value>).

Installation

You can install the plugin via npm:

npm install @toolwind/corner-shape # or pnpm, yarn, bun
/* globals.css */
@import "tailwindcss";
@plugin "@toolwind/corner-shape";
// tailwind.config.js
import cornerShape from '@toolwind/corner-shape';

export default {
  // ...
  plugins: [cornerShape]
}
// tailwind.config.cjs
module.exports = {
  // ...
  plugins: [
    require('@toolwind/corner-shape'),
  ]
}

How it works

This plugin leverages the new CSS corner-shape property, which allows you to control the shape of element corners using both standard keywords as well as functional values.

Because this property is not yet supported in all browsers, consider it forward-looking, though it is safe to use as it degrades gracefully. The utilities generated by this plugin map directly to the corner-shape property and its per-corner longhands.

For example:

<div class="corner-squircle">…</div>
.corner-squircle {
  corner-shape: squircle;
}

View this example on Tailwind Play

Usage

  • All corners at once: corner-{shape}
  • Physical edges (two corners at a time):
    • corner-t-{shape} → top-left and top-right
    • corner-r-{shape} → top-right and bottom-right
    • corner-b-{shape} → bottom-right and bottom-left
    • corner-l-{shape} → top-left and bottom-left
  • Physical single corners:
    • corner-tl-{shape}, corner-tr-{shape}, corner-br-{shape}, corner-bl-{shape}
  • Logical edges (writing-direction aware):
    • corner-s-{shape} → start-start and end-start
    • corner-e-{shape} → start-end and end-end
  • Logical single corners:
    • corner-ss-{shape}, corner-se-{shape}, corner-ee-{shape}, corner-es-{shape}

Supported static shapes: round, scoop, bevel, notch, square, squircle

<div class="
  corner-squircle
  md:corner-t-bevel
  lg:corner-tr-notch
">
</div>

Functional value: superellipse

Use Tailwind’s modifier syntax (/) to pass a superellipse(<value>) parameter:

  • .corner-superellipse/50
  • .corner-t-superellipse/32
  • .corner-tr-superellipse/e
  • .corner-s-superellipse/-pi

Accepted values are:

  • a number (e.g. 2, 0.5, -1)
  • one of the constants: e, pi, infinity (optionally negative: -e, -pi, -infinity)

Examples:

<div class="corner-superellipse/1.5"></div>
<div class="corner-br-superellipse/pi"></div>
<div class="corner-e-superellipse/-infinity"></div>

Notes:

  • Values are passed through as-is to superellipse(<value>). Do not include units.
  • Logical shorthands (s, e, ss, se, ee, es) adapt with writing direction.

Keyword equivalents

| Keyword | Description | Equivalent | |----------|-----------------------------------------------------------------------------|------------| | bevel | Defines a straight, diagonal corner, which is neither convex nor concave. | superellipse(0) | | notch | Defines a 90-degree concave square corner. | superellipse(-infinity) | | round | Defines a convex ordinary ellipse; the standard rounded corner created by border-radius without corner-shape. This is the default (initial) value. | superellipse(1) | | scoop | Defines a concave ordinary ellipse. | superellipse(-1) | | square | Defines a 90-degree convex square corner; the default shape when no border-radius (or border-radius: 0) is applied. | superellipse(infinity) | | squircle | Defines a “squircle”, a convex curve in between round and square. | superellipse(2) |

Complete utility reference

  • All corners
    • corner-{shape}
    • corner-superellipse/{value}
  • Edges (physical)
    • corner-{t|r|b|l}-{shape}
    • corner-{t|r|b|l}-superellipse/{value}
  • Corners (physical)
    • corner-{tl|tr|br|bl}-{shape}
    • corner-{tl|tr|br|bl}-superellipse/{value}
  • Edges (logical)
    • corner-s-{shape}, corner-e-{shape}
    • corner-{s|e}-superellipse/{value}
  • Corners (logical)
    • corner-{ss|se|ee|es}-{shape}
    • corner-{ss|se|ee|es}-superellipse/{value}

Where {shape} is one of round, scoop, bevel, notch, square, squircle.

Variants and composition

All standard Tailwind variants work:

<button class="hover:corner-s-squircle focus:corner-br-bevel"></button>

Browser support

This plugin emits the corner-shape and corner-*-shape properties. Support for these properties varies by browser and may change over time. Consider providing design fallbacks (e.g. border-radius) where necessary.

Learn more


I hope you find @toolwind/corner-shape a valuable addition to your projects. If you have any issues or suggestions, don't hesitate to open an issue or pull request.

If you liked this, you might also like my other Tailwind CSS plugins: