skills/m3-web-tailwind/SKILL.md
Implement Material Design 3 with Tailwind CSS by mapping M3 design tokens to Tailwind's theme configuration. Covers the tailwind-material-3 plugin and manual token mapping. Use this when building M3-styled projects with Tailwind CSS.
npx skillsauth add shelbeely/shelbeely-agent-skills m3-web-tailwindInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Tailwind CSS can integrate M3 design tokens by mapping them to Tailwind's theme configuration. Use the tailwind-material-3 plugin or manually map tokens for a utility-first M3 styling approach.
Keywords: Material Design 3, M3, Tailwind CSS, tailwind-material-3, utility-first, design tokens, CSS variables
npm install tailwind-material-3
// tailwind.config.js
const m3Plugin = require('tailwind-material-3');
module.exports = {
plugins: [m3Plugin],
// M3 tokens are now available as Tailwind utilities
};
Define M3 tokens as CSS custom properties:
/* globals.css */
:root {
--color-primary: #6750A4;
--color-on-primary: #FFFFFF;
--color-primary-container: #EADDFF;
--color-on-primary-container: #21005D;
--color-secondary: #625B71;
--color-on-secondary: #FFFFFF;
--color-tertiary: #7D5260;
--color-error: #B3261E;
--color-surface: #FEF7FF;
--color-on-surface: #1D1B20;
--color-surface-variant: #E7E0EC;
--color-on-surface-variant: #49454F;
--color-outline: #79747E;
--color-outline-variant: #CAC4D0;
}
Map to Tailwind config:
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
primary: 'var(--color-primary)',
'on-primary': 'var(--color-on-primary)',
'primary-container': 'var(--color-primary-container)',
'on-primary-container': 'var(--color-on-primary-container)',
secondary: 'var(--color-secondary)',
'on-secondary': 'var(--color-on-secondary)',
tertiary: 'var(--color-tertiary)',
error: 'var(--color-error)',
surface: 'var(--color-surface)',
'on-surface': 'var(--color-on-surface)',
'surface-variant': 'var(--color-surface-variant)',
'on-surface-variant': 'var(--color-on-surface-variant)',
outline: 'var(--color-outline)',
'outline-variant': 'var(--color-outline-variant)',
},
borderRadius: {
'md3-xs': '4px',
'md3-sm': '8px',
'md3-md': '12px',
'md3-lg': '16px',
'md3-xl': '28px',
'md3-full': '9999px',
},
},
},
};
<button class="bg-primary text-on-primary rounded-md3-full px-6 py-2.5
text-sm font-medium tracking-wide hover:opacity-92
disabled:bg-on-surface/12 disabled:text-on-surface/38">
Filled Button
</button>
<div class="bg-surface rounded-md3-md p-4 shadow-md">
<h3 class="text-on-surface text-base font-medium">Title</h3>
<p class="text-on-surface-variant text-sm">Content</p>
</div>
<div class="relative">
<input class="border border-outline rounded-md3-xs px-4 py-4
text-on-surface bg-transparent w-full
focus:border-primary focus:border-2 focus:outline-none"
placeholder="Email" />
</div>
<span class="inline-flex items-center border border-outline rounded-md3-sm
px-3 py-1.5 text-sm text-on-surface-variant">
Filter Chip
</span>
tailwind.config.js — Ready-to-use Tailwind config with M3 tokens (orange palette) included in this skill's directory. Copy into your project and customize.material-theme-builder skill — Generate a custom palette from any source color.tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
development
Generate Material Design 3 color themes programmatically from a source color using @material/material-color-utilities, the same engine that powers the Material Theme Builder. Use this when the user asks to generate an M3 color palette, create a custom theme from a brand color, or export M3 tokens to CSS, JSON, or framework configs.
testing
Applies Material Design 3 Expressive typography principles including variable fonts, type scales, and hierarchy. Use this when working on text styling, type hierarchy, readable interfaces, or when the user asks to apply Material Design 3 typography guidelines.
testing
Applies Material Design 3 Expressive shape and containment principles including rounded corners, morphing shapes, and container design. Use this when working on component shapes, borders, containment, or when the user asks to apply Material Design 3 shape guidelines.