bun-tailwind

Fix Bun and Tailwind wiring issues for CSS-first integration.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/alexgorbatchev/ai-registry --skill bun-tailwind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-tailwind
Source: https://github.com/alexgorbatchev/ai-registry/tree/main/skills/bun-tailwind
Command: npx skills add https://github.com/alexgorbatchev/ai-registry --skill bun-tailwind

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Streamlines the process of integrating Tailwind v4 with Bun apps by clarifying the required project structure, token management, and consumer-facing guidance for bundling and scanning assets.

Core Features & Use Cases

  • CSS-first Tailwind integration: Ensure Tailwind is wired through CSS, not JavaScript config, with explicit @import and @source usage.
  • Theme token sharing: Use a shared theme stylesheet (src/theme.css) to map tokens to CSS variables for library consumers.
  • Dual build-path support: Document and maintain both Bun static-route bundling (bunfig.toml) and manual Bun.build() paths to cover common setups.
  • Consumer-ready packaging: Provide guidance on how consumers should import and scan the package output for proper styling.

Quick Start

Follow the steps to wire Bun Tailwind by updating bunfig.toml and Bun.build() usage so the Tailwind paths are loaded correctly.

Frequently Asked Questions about bun-tailwind

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Tailwind CSS v4 with Bun using a CSS-first approach?

To integrate Tailwind CSS v4 with Bun, wire the framework through CSS using explicit @import tailwindcss and @source directives rather than JavaScript configuration. This ensures reliable styling delivery across your Bun application without relying on a traditional tailwind.config.js file.

How do I configure Bun static-route bundling for Tailwind assets?

Configure Bun static-route bundling for Tailwind assets by updating bunfig.toml to define explicit build paths. This setup loads Tailwind paths correctly during the bundling process, ensuring your CSS is processed and delivered reliably across the application.

How do I share design tokens between a Bun package and its consumers?

Share design tokens between a Bun package and its consumers by maintaining a shared theme stylesheet at src/theme.css. This file maps your design tokens to CSS variables, allowing downstream consumers to import and scan the package output for proper styling application.

Does Bun.build() support manual Tailwind CSS bundling alongside bunfig.toml?

Yes, Bun.build() supports manual Tailwind CSS bundling alongside bunfig.toml configurations. This dual build-path support covers common setups, allowing you to choose between static-route bundling and explicit manual build paths for your frontend assets.

Why is my Tailwind CSS not loading correctly in my Bun project?

Tailwind CSS fails to load correctly in Bun projects when wiring issues prevent proper asset scanning. Fix this by enforcing @import tailwindcss, @source directives, and a shared theme.css for tokens, while documenting the required project layout for reliable styling delivery.

Do I need a tailwind.config.js file for Tailwind v4 in Bun applications?

No, you do not need a tailwind.config.js file for Tailwind v4 in Bun applications. The integration enforces a CSS-first approach using @import tailwindcss and @source directives within your stylesheets, eliminating the need for JavaScript-based configuration.