Search by

symfony / ux-css

fabpot

Typed atomic CSS for Twig, driven by design tokens and validated at compile time

Package info

github.com/symfony/ux-css

Homepage

Type:symfony-bundle

pkg:composer/symfony/ux-css

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 1

3.x-dev 2026-11-01 07:58 UTC

This package is auto-updated.

Last update: 2026-11-01 07:59:11 UTC


README

EXPERIMENTAL This bundle is currently experimental and is likely to change, possibly significantly, before its first stable release.

Symfony UX CSS provides a css() Twig function in the spirit of Panda CSS: it turns a hash of style properties into atomic class names, built from your design tokens and validated when templates compile.

Installation

composer require symfony/ux-css

Usage

<div class="{{ css({ p: 'md', color: 'fg', _hover: { color: 'primary' }, md: { p: 'lg' } }) }}">

The attribute becomes class="p_md c_fg hover:c_primary md:p_lg", and the bundle writes the matching rules to var/ux_css/styles.css.

Resources