agentleFS
luigi-dvluigi-dv/react-ts-vite/.claude/skills/tailwind-design-system/SKILL.md

tailwind-design-system

Skill1 starsChanged 27 days agoMITView on GitHub

Apply the project's Tailwind CSS design system — brand tokens, dark mode, spacing and typography scale, Headless UI v2 patterns and Heroicons — when styling or re-theming UI. Use when building screens, fixing visual inconsistencies, adding interactive components (dialogs, menus, listboxes) or changing the brand palette.

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use bfl-api, flux-best-practices and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LinHao-citySkill

    bfl-api

    BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.

    Also in 3 projects that use this

  • LinHao-citySkill

    flux-best-practices

    Comprehensive guide for BFL FLUX image generation models. Covers prompting, T2I, I2I, structured JSON, hex colors, typography, multi-reference editing, and model-specific best practices for FLUX.2 and FLUX.1 families.

    Also in 3 projects that use this

  • dAAAbSkill

    heygen

    Also in 3 projects that use this

  • MoizIbnYousafSkill

    visual-style

    Build a persistent visual brand identity for image generation. Defines how the brand looks visually — aesthetic, lighting, composition, mood — and writes it to brand/creative-kit.md so /image-gen and other creative skills produce consistent on-brand visuals. Three modes: Extract (from website/URL), Build (interview), Reference (mood board/examples). Use when starting any project that needs images, when the user says "visual style", "brand aesthetic", "image style", "visual identity", "how should our images look", "build visual brand", "define our look", or when /image-gen outputs feel generic because no visual style exists yet.

    Also in 3 projects that use this

  • +8 more from LinHao-city

The file

Files
SKILL.md

Tailwind design system

The project pairs Tailwind CSS 3 (tailwind.config.cjs, postcss.config.cjs) with Headless UI v2 for behaviour and Heroicons for icons. The always-on rule design-system has the principles; this skill has the recipes.

Tokens

src/index.css defines the brand scale as RGB triplets so opacity modifiers work:

:root {
  --brand-600: 79 70 229; /* bg-brand-600, text-brand-600/80 … */
}

tailwind.config.cjs maps them to brand-50 … brand-950. To re-theme, paste a new 11-step scale (e.g. from the Tailwind palette) into the variables — every template follows. Add new semantic tokens the same way (--surface, --accent) and expose them under theme.extend.colors.

Usage conventions:

PurposeClasses
Primary actionbg-brand-600 text-white hover:bg-brand-500 focus-visible:outline-brand-600
Secondary actionbg-white text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 dark:bg-gray-900 dark:text-gray-100 dark:ring-gray-700
Page surfacebg-white text-gray-900 dark:bg-gray-950 dark:text-gray-100
Cardrounded-lg bg-white shadow ring-1 ring-gray-900/5 dark:bg-gray-900 dark:ring-white/10
Muted texttext-gray-600 dark:text-gray-400
Links/accentstext-brand-600 hover:text-brand-500 dark:text-brand-400
Badgerounded-full bg-brand-50 px-2 py-1 text-xs font-medium text-brand-700 ring-1 ring-inset ring-brand-600/20

Dark mode

darkMode: 'class'. Add dark: variants wherever you set a colour. Toggle with the useTheme hook from the dashboard template (document.documentElement.classList.toggle('dark'), persisted in localStorage, defaults to prefers-color-scheme). Promote the hook to @hooks/useTheme when more than one page needs it.

Headless UI v2 recipes

Named exports only; style states through data attributes.

import { Dialog, DialogPanel, DialogTitle } from '@headlessui/react'

;<Dialog open={open} onClose={setOpen} className="relative z-50">
  <div className="fixed inset-0 bg-gray-900/50" aria-hidden="true" />
  <div className="fixed inset-0 flex items-center justify-center p-4">
    <DialogPanel className="w-full max-w-md rounded-2xl bg-white p-6 shadow-xl dark:bg-gray-900">
      <DialogTitle className="text-lg font-semibold">Title</DialogTitle>…
    </DialogPanel>
  </div>
</Dialog>
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react'

;<Menu>
  <MenuButton className="…">Options</MenuButton>
  <MenuItems
    anchor="bottom end"
    className="w-48 rounded-md bg-white p-1 shadow-lg ring-1 ring-gray-900/5 dark:bg-gray-800"
  >
    <MenuItem>
      <a
        href="/settings"
        className="block rounded px-3 py-1.5 text-sm data-[focus]:bg-gray-100 dark:data-[focus]:bg-gray-700"
      >
        Settings
      </a>
    </MenuItem>
  </MenuItems>
</Menu>

Other building blocks: Listbox (custom select), Switch (toggle), Disclosure (accordion), Popover, Tabs, Transition (transition prop + data-[closed]:opacity-0).

Icons

@heroicons/react/24/outline for chrome and navigation, 24/solid for emphasis, 20/solid inline/dense. Always aria-hidden="true" with an sr-only label on icon-only buttons. Size with h-5 w-5 / h-6 w-6.

Layout and type scale

  • Containers: mx-auto max-w-7xl px-6 lg:px-8; content column max-w-2xl/max-w-3xl.
  • Vertical rhythm: section padding py-24 sm:py-32; stack spacing space-y-6; grid gaps gap-x-8 gap-y-10.
  • Headings: h1 text-4xl font-bold tracking-tight sm:text-6xl (marketing) or text-2xl font-semibold tracking-tight (app); body text-base leading-7 / text-lg leading-8; labels text-sm font-medium leading-6.
  • Breakpoints: design for mobile, then sm: (640), lg: (1024), xl: (1280).

Forms

@tailwindcss/forms normalises controls. Field pattern: block w-full rounded-md border-0 py-1.5 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm plus dark:bg-gray-900 dark:ring-gray-700. Error state swaps the ring to ring-red-400 focus:ring-red-500 and links the message with aria-describedby (see TextField in the auth template).

Checklist

  • Only utilities and tokens; no ad-hoc hex colours
  • dark: variant for every colour
  • Headless UI for interactive patterns, Heroicons for icons
  • Focus visible, contrast AA, mobile first
  • Run Prettier (class order) — npm run format

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.