Skip to content

Repository files navigation

Toolwind Plugins

A monorepo housing all of Toolwind's Tailwind CSS plugins, along with the shared types and utilities they build on. Each plugin keeps its own package.json and is versioned and published to npm independently — this repo just brings them under one umbrella for shared code, unified docs, and easier maintenance.

Plugins

Each plugin's full documentation lives in its own README, linked below. Version badges reflect the latest published release on npm.

Plugin Package Version Description
Anchors @toolwind/anchors npm Declarative CSS anchor positioning relative to custom anchors
Corner Shape @toolwind/corner-shape npm Utilities for applying corner shapes to elements
Tagged Combinators @toolwind/tagged-combinators npm Tagged combinator support for targeting children and descendants
Default Shades tailwindcss-default-shades npm Default shades for colors — bg-blue instead of bg-blue-500
JS Context tailwindcss-js-context npm JS script injection utility for Tailwind CSS
Lerp Colors tailwindcss-lerp-colors npm Interpolate between configured colors for additional color stops
Members tailwindcss-members npm The inverse of group — style a parent based on its descendants
Mixins tailwindcss-mixins npm A mixin variant/utility pair for reusable groups of utilities
Multi tailwindcss-multi npm Group multiple utilities together in a single declaration
Relational tailwindcss-selector-patterns npm Dynamic selector patterns for relational element targeting
Shadows tailwindcss-directional-shadows npm Directional shadow support for box shadows
Signals tailwindcss-signals npm Apply styles based on ancestor state via style queries

Repository structure

plugins/    One folder per plugin — each with its own package.json, docs, and
            independent npm releases (full git history preserved on import)
shared/     Private workspace packages shared across plugins at build time
            (@toolwind/types, @toolwind/utils) — see shared/README.md

Development

This repo is a pnpm workspace orchestrated by Turborepo. Install everything from the repo root:

pnpm install

Everyday tasks run through the root scripts (all cached and parallelized by turbo):

pnpm run build      # build every package (tsdown → dual ESM/CJS + .d.ts)
pnpm run typecheck  # tsc --noEmit in every package (TypeScript 7 / tsgo)
pnpm run test       # run test suites (jest)
pnpm run check      # lint + format check (Ultracite: Oxlint + Oxfmt)
pnpm run fix        # auto-fix lint findings and reformat
pnpm run publint    # validate every plugin's publish artifacts

Scope any task to one package with a filter, or cd into its folder and run scripts directly:

pnpm --filter @toolwind/anchors run build

Toolchain notes

  • Builds use tsdown: each plugin emits dist/index.{mjs,cjs} plus matching .d.mts/.d.cts declarations, so every package works from both ESM and CJS consumers. Only plain JS and types are published.
  • Shared dev dependency versions live in the pnpm catalog in pnpm-workspace.yaml (typescript, tsdown, tailwindcss, @types/node); packages reference them as catalog:.
  • Type-checking runs on TypeScript 7 (the Go-based compiler). It's internal-only — published types are plain .d.ts files usable from any TS version. (lerp-colors additionally pins TypeScript 5.x locally because ts-jest can't run on TS 7 yet.)
  • Linting/formatting is Ultracite's Oxlint + Oxfmt preset, configured in oxlint.config.ts. eslint/sort-keys is disabled globally: these plugins build CSS-in-JS objects where key order controls emitted declaration order.
  • anchors consumes Tailwind v4 internals (parseModifier) from a pinned GitHub source tarball of tailwindlabs/tailwindcss@v4.1.5 (aliased as tailwindcss-v4, resolving to the @tailwindcss/root workspace package), patched natively via pnpm patch — see patchedDependencies in pnpm-workspace.yaml and the patch in patches/. Tailwind v3 remains each plugin's default peer; the v4 tarball only feeds v4-specific code paths at build time.

Publishing

Each plugin is published independently under its own name and version:

pnpm --filter @toolwind/anchors publish

Plugins with a prepublishOnly build step will build automatically on publish. The shared/* packages are private and are never published; anything a plugin uses from them gets bundled into that plugin's dist at build time — see shared/README.md.

License

MIT © Brandon McConnell

About

Monorepo for Toolwind's Tailwind CSS plugins and shared internal packages.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages