A GitHub Action that generates theme tokens for Prime UI libraries (PrimeVue, PrimeNG, etc.) based on design tokens from your design system. This action enables seamless continuous integration between your design tokens and Prime UI theme generation.
- 🎨 Design Token Integration: Convert design tokens to Prime UI compatible themes
- 🚀 Multiple Prime UI Library Support: Works with PrimeVue, PrimeNG currently. PrimeReact support will be added in the future.
- ⚡ Fast Theme Generation: Automated theme creation from your CI/CD pipeline
- 🎯 Live Preview: View the generated theme at Prime UI showcases using Theme Designer
- 🔐 Secure Authentication: Uses API keys for secure theme generation
- 📦 Ready-to-Use: No additional setup required, works out of the box
name: Automated Figma To Theme Code
on:
push:
paths:
- "tokens.json"
permissions:
contents: write
jobs:
generate-tokens:
name: Generate Theme Code
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate Prime Theme
uses: primefaces/theme-designer-ci@1.0.0-beta.4
with:
designer-secret: ${{ secrets.THEME_DESIGNER_SECRET_KEY }}
theme-name: "acme"
font-size: "14px"
font-family: "Inter Var"
project: "primevue"
tokens-path: "tokens.json"
output-dir: "./acme-theme"
| Input | Description | Required | Default |
|---|---|---|---|
designer-secret |
API key for authentication with the Prime Theme Designer service | ✅ Yes | - |
theme-name |
Name of the theme to generate | ✅ Yes | - |
project |
Target Prime UI project (primevue, primeng) |
✅ Yes | - |
font-size |
Font size for theme preview in visual editor | ❌ No | 14px |
font-family |
Font family for theme preview in visual editor | ❌ No | Inter Var |
tokens-path |
Path to the design tokens file | ❌ No | tokens.json |
output-dir |
Directory where generated theme files will be saved | ❌ No | ./ |
- Visit the PrimeUI Store
- Purchase an Extended License
- Navigate to your account settings
- Generate a secret key for CI/CD integration
- Go to your GitHub repository
- Navigate to Settings > Secrets and variables > Actions
- Click New repository secret
- Give a name such as:
THEME_DESIGNER_SECRET_KEY - Value: Your API key from Prime Theme Designer
- Click Add secret
Visit the Token Studio documentation for a comprehensive guide to connect repository so that you'll be able to push tokens.json to the git repository where this action runs.
The action generates theme files compatible with your specified Prime UI project. You may import the theme files to your project, and configure it as your "preset".
Visit the example repository with a sample configuration.
https://github.com/primefaces/theme-designer-ci-test
After your CI pipeline completes successfully, your theme becomes available in the Prime UI Theme Designer.
- Navigate to the Prime UI library website.
- Click the ⚙️ icon at topbar to open up Designer Editor.
- Sign in with your license key and pass key credentials.
- Then select your theme from the available options to apply it across all demos and website content.
- Note that CI-generated themes are provided in read-only mode for preview purposes only and cannot be edited in the Theme Designer.
- PrimeVue (
primevue) - Vue.js UI library - PrimeNG (
primeng) - Angular UI library - PrimeReact (soon) (
primereact) - React UI library
Authentication Failed
- Verify your API key is correct and added to repository secrets
Invalid Tokens Format
- Ensure your
tokens.jsonfollows the expected structure - Validate JSON syntax using a JSON validator
- Make sure default tokens are not removed and in case new tokens are required, they are defined under the https://primevue.org/uikit/guide/#tokensets tokenset.
Missing Output Files
- Check that the
output-dirpath is correct - Verify repository permissions allow file creation
Project Not Supported
- Ensure the
projectinput matches supported values: 'primevue', 'primeng'.
Enable debug logging by setting the ACTIONS_STEP_DEBUG repository secret to true.
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 📖 Documentation: Prime Theme Designer Guide
- 💬 Community: PrimeTek Community Forum
- 🐛 Issues: GitHub Issues
- 📧 Enterprise Support: Contact PrimeTek
This action is developed and maintained by PrimeTek Informatics, the team behind the Prime UI libraries trusted by thousands of developers worldwide.
Made with ❤️ by the PrimeTek Team