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 🙏

© 2026 – Pkg Stats / Ryan Hefner

tailwind-super-corners

v1.0.0

Published

Tailwind CSS v4 plugin for concentric border-radius, outer corners, and corner shapes (squircle, superellipse, bevel, etc.)

Readme

tailwind-super-corners

Tailwind CSS v4 plugin with three corner utilities:

  • Concentric — auto-calculated inner border-radius for nested elements
  • Outer corners — inverse (concave) rounded corners via pseudo-elements
  • Corner shape — CSS corner-shape property (squircle, superellipse, etc.)

Install

bun add tailwind-super-corners
/* globals.css */
@import "tailwind-super-corners";

tailwind-merge

If you use tailwind-merge, the package exports a plugin that registers all sc-* class groups automatically:

import { withSuperCorners } from "tailwind-super-corners"
import { extendTailwindMerge } from "tailwind-merge"

const twMerge = extendTailwindMerge(withSuperCorners)

This ensures sc-concentric classes conflict correctly with rounded-*, shape keywords override each other, etc.


1. Concentric borders (sc-concentric)

Automatically computes inner_radius = outer_radius - gap for nested elements. Supports unlimited nesting depth via CSS container style queries with even/odd parity toggle.

How it works

  1. Parent uses standard Tailwind rounded-* and p-* classes — the plugin shadows these to also set --sc-radius and --sc-gap.
  2. Child uses sc-concentric to read the propagated values and apply the correct inner radius.
  3. Each nesting level accumulates the subtraction automatically.

Publisher classes (parent)

These shadow core Tailwind utilities. You don't need special classes — just use normal rounded-* and p-*:

| Class | Sets | |---|---| | rounded-{token} | border-radius + --sc-radius | | rounded-t-{token} | top corners + --sc-radius | | rounded-r-{token} | right corners + --sc-radius | | rounded-b-{token} | bottom corners + --sc-radius | | rounded-l-{token} | left corners + --sc-radius | | p-{token} | padding + --sc-gap | | px-{token} | padding-inline + --sc-gap | | py-{token} | padding-block + --sc-gap | | pt-{token} | padding-top + --sc-gap | | pb-{token} | padding-bottom + --sc-gap | | ps-{token} | padding-inline-start + --sc-gap | | pe-{token} | padding-inline-end + --sc-gap |

Consumer classes (child)

| Class | Corners affected | Fallback | |---|---|---| | sc-concentric | all | inherit | | sc-concentric-{token} | all | {token} value | | sc-t-concentric[-{token}] | top-left, top-right | | | sc-r-concentric[-{token}] | top-right, bottom-right | | | sc-b-concentric[-{token}] | bottom-right, bottom-left | | | sc-l-concentric[-{token}] | top-left, bottom-left | | | sc-tl-concentric[-{token}] | top-left | | | sc-tr-concentric[-{token}] | top-right | | | sc-bl-concentric[-{token}] | bottom-left | | | sc-br-concentric[-{token}] | bottom-right | |

The {token} is any borderRadius theme value (e.g. lg, xl, 3xl). When omitted, falls back to inherit.

Example

<!-- Parent: 3xl radius, 4 padding -->
<div class="rounded-3xl p-4 bg-gray-100">
  <!-- Child: auto-calculated radius (3xl - 4 = concentric) -->
  <div class="sc-concentric bg-white">
    <!-- Grandchild: works at any depth -->
    <div class="p-2">
      <div class="sc-concentric bg-gray-50">...</div>
    </div>
  </div>
</div>

With explicit fallback

<!-- If no parent propagates, falls back to rounded-lg -->
<div class="sc-concentric-lg bg-white">...</div>

2. Outer corners (sc-out)

Creates inverse (concave) rounded corners using ::before and ::after pseudo-elements. The element must be position: relative for correct placement.

Automatically upgrades to native corner-shape: superellipse() with negative values when supported.

All-corners variants

| Class | Description | |---|---| | sc-out | Both bottom corners, default radius | | sc-out-{size} | Both bottom corners, custom radius |

Side variants (two corners)

| Class | Corners | Pseudo-elements | |---|---|---| | sc-out-t[-{size}] | top-left + top-right | ::before + ::after | | sc-out-b[-{size}] | bottom-left + bottom-right | ::before + ::after | | sc-out-l[-{size}] | left-top + left-bottom | ::before + ::after | | sc-out-r[-{size}] | right-top + right-bottom | ::before + ::after |

Individual corner variants

| Class | Corner | Pseudo-element | |---|---|---| | sc-out-tl[-{size}] | top-left | ::before | | sc-out-tr[-{size}] | top-right | ::after | | sc-out-bl[-{size}] | bottom-left | ::before | | sc-out-br[-{size}] | bottom-right | ::after | | sc-out-lt[-{size}] | left-top | ::before | | sc-out-lb[-{size}] | left-bottom | ::after | | sc-out-rt[-{size}] | right-top | ::before | | sc-out-rb[-{size}] | right-bottom | ::after |

Note on naming: sc-out-bl = bottom-left (horizontal edge), sc-out-lb = left-bottom (vertical edge). The first letter indicates the edge, the second indicates which end of that edge.

Sizing

  • Without suffix: uses --sc-out-radius-base (default 1rem)
  • With suffix: accepts any length (sc-out-2xl, sc-out-[12px]) or --radius-* theme tokens

Example

<!-- Tab-like element with outer corners at the bottom -->
<div class="relative bg-blue-500 sc-out">
  Tab content
</div>

<!-- Custom size -->
<div class="relative bg-blue-500 sc-out-xl">
  Tab content
</div>

<!-- Only bottom-left corner -->
<div class="relative bg-blue-500 sc-out-bl">
  Tab content
</div>

Requirements

  • The element needs position: relative (add relative class)
  • The element needs a background (bg-*), as pseudo-elements inherit it
  • Pseudo-elements are positioned absolutely outside the element bounds — ensure the parent has overflow: visible (default)

3. Corner shape (sc-{shape})

Sets the CSS corner-shape property on individual or grouped corners.

Static keywords

| Class prefix | CSS output | --corner-superellipse | |---|---|---| | sc-round | corner-shape: round | 1 | | sc-scoop | corner-shape: scoop | -1 | | sc-bevel | corner-shape: bevel | 0 | | sc-notch | corner-shape: notch | -infinity | | sc-square | corner-shape: square | infinity | | sc-squircle | corner-shape: squircle | 2 | | sc-smooth | corner-shape: superellipse(1.6) | 1.6 |

Superellipse with custom exponent

Use sc-superellipse/{value} for arbitrary superellipse values:

<div class="rounded-xl sc-superellipse/2">...</div>   <!-- squircle -->
<div class="rounded-xl sc-superellipse/1.6">...</div>  <!-- smooth -->
<div class="rounded-xl sc-superellipse/4">...</div>    <!-- more squared -->

Accepts numbers, e, pi, infinity, and their negatives.

Per-corner and per-side

All shape classes support side/corner prefixes:

| Prefix | Corners affected | |---|---| | sc- | all corners | | sc-t- | top-left + top-right | | sc-r- | top-right + bottom-right | | sc-b- | bottom-right + bottom-left | | sc-l- | top-left + bottom-left | | sc-s- | start-start + end-start (logical) | | sc-e- | start-end + end-end (logical) | | sc-tl- | top-left | | sc-tr- | top-right | | sc-br- | bottom-right | | sc-bl- | bottom-left | | sc-ss- | start-start (logical) | | sc-se- | start-end (logical) | | sc-ee- | end-end (logical) | | sc-es- | end-start (logical) |

Examples

<!-- Squircle all corners -->
<div class="rounded-2xl sc-squircle">...</div>

<!-- Smooth top, bevel bottom -->
<div class="rounded-2xl sc-t-smooth sc-b-bevel">...</div>

<!-- Custom superellipse on one corner -->
<div class="rounded-2xl sc-tl-superellipse/3">...</div>

<!-- Notch only bottom-right -->
<div class="rounded-xl sc-br-notch">...</div>

Browser support

corner-shape is a new CSS property. Currently supported in Chrome 138+ behind a flag. The --corner-superellipse custom property is always set for use by other utilities (like sc-out's progressive enhancement).


Combined usage

All three features compose together:

<!-- Outer card with squircle shape + concentric inner card -->
<div class="rounded-3xl p-6 bg-gray-100 sc-squircle">
  <div class="sc-concentric bg-white p-4">
    <div class="sc-concentric bg-gray-50">
      Unlimited nesting, auto-calculated radius
    </div>
  </div>
</div>

<!-- Tab bar with outer corners and smooth shape -->
<div class="relative bg-white rounded-t-xl sc-out-bl sc-out-br sc-smooth">
  Active tab
</div>

CSS custom properties

| Variable | Set by | Description | |---|---|---| | --sc-radius | rounded-* publishers | Propagated border-radius value | | --sc-gap | p-* publishers | Propagated padding/gap value | | --sc-odd / --sc-even | Parity system | Accumulated radius at each depth | | --_sc-parity | Parity system | Current parity (odd / even) | | --_sc-active | rounded-* publishers | Marks element as concentric root | | --sc-out-radius-base | Theme | Default outer corner radius (1rem) | | --sc-out-mask | Theme | Radial gradient mask for outer corners | | --corner-superellipse | sc-{shape} | Superellipse exponent for progressive enhancement |

License

MIT