anycreator-tailwind-preset
v1.2.0
Published
AnyCreator Tailwind CSS preset with design system colors, border radius, and theme configuration.
Maintainers
Readme
AnyCreator Tailwind CSS Preset
A Tailwind CSS preset that includes the AnyCreator design system configuration with colors, border radius, and theme values.
Installation
npm install anycreator-tailwind-presetUsage
Tailwind CSS v3
Add the preset to your tailwind.config.js:
module.exports = {
presets: [require("anycreator-tailwind-preset")],
content: [
// your content paths
],
// your additional configuration
};Tailwind CSS v4
For Tailwind CSS v4, add the preset to your tailwind.config.ts or tailwind.config.js:
import type { Config } from "tailwindcss";
import preset from "anycreator-tailwind-preset";
export default {
presets: [preset],
content: [
// your content paths
],
// your additional configuration
} satisfies Config;Or with JavaScript:
import preset from "anycreator-tailwind-preset";
export default {
presets: [preset],
content: [
// your content paths
],
// your additional configuration
};Included Design Tokens
Colors
- Primary Colors:
black-main,blue-main - State Colors:
disabled,error,success - Gray Scale: Various gray shades with hex-based naming
- Red Scale: Multiple red variants for different use cases
Border Radius
rounded-xs(3px)rounded-sm(5px)rounded(7px) - defaultrounded-md(9px)rounded-lg(15px)rounded-xl(24px)rounded-2xl(32px)rounded-3xl(40px)rounded-4xl(48px)
Background & Border Colors
bg-main- Main background colorborder-gray-main,border-gray-6e7c89- Border color variants
Example Usage
<div class="bg-main border border-gray-main rounded-lg p-4">
<h1 class="text-black-main">Hello AnyCreator</h1>
<button class="bg-blue-main text-white rounded-md px-4 py-2">Click me</button>
</div>Development & Publishing
🚀 Fully Automated Publishing
This package uses semantic-release for zero-config automated publishing. No manual versioning needed!
How it works:
- Create a feature branch
- Make changes with conventional commit messages
- Open a Pull Request to
main - Merge the PR → Automatic release! 🎉
Quick Start for Contributors
# Create feature branch
git checkout -b feature/new-colors
# Make changes with conventional commits
git commit -m "feat: add purple color palette"
git commit -m "fix: correct border-radius values"
# Push and create PR
git push origin feature/new-colors
# Open PR on GitHub, get it reviewed, then merge
# 🎉 Automatic release happens on merge!What gets automated:
- ✅ Version calculation (patch/minor/major)
- ✅
CHANGELOG.mdgeneration - ✅ npm publishing
- ✅ GitHub releases with notes
- ✅ Git tags
Commit Message Guide
| Type | Example | Release |
| ------------------------------ | -------------------------------- | ------------- |
| fix: | fix: border radius calculation | Patch (1.0.1) |
| feat: | feat: add purple color palette | Minor (1.1.0) |
| feat!: or BREAKING CHANGE: | feat!: rename color variables | Major (2.0.0) |
| docs:, style:, refactor: | docs: update examples | No release |
Setup (One-time)
- Add NPM token to GitHub:
- Generate token at npmjs.com (Automation type)
- Add to repo secrets as
NPM_TOKEN
That's it! 🎯
Manual Publishing (Emergency Only)
npm login
bun run prepublishOnly # Validate
npm publish # npm still needed for publishing💡 Tip: See CONTRIBUTING.md for detailed examples and workflow explanations.
Package Contents
The published package includes:
index.js- Main preset configurationREADME.md- DocumentationLICENSE- MIT licensepackage.json- Package metadata
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
