symfinity / ux-blocks
Registry schema and shared test helpers for the Symfinity UX Blocks component family
v0.1.1
2026-06-22 23:03 UTC
Requires
- php: >=8.2
- symfony/config: ^7.4||^8.0
- symfony/console: ^7.4||^8.0
- symfony/dependency-injection: ^7.4||^8.0
- symfony/framework-bundle: ^7.4||^8.0
- symfony/http-kernel: ^7.4||^8.0
- symfony/process: ^7.4||^8.0
- symfony/yaml: ^7.4||^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^10.5 || ^11.0
Suggests
- symfinity/ui-action: Native HTTP action semantics for interactive blocks
- symfinity/ui-kernel: Token-driven role CSS and flavours when building styled blocks
- symfony/ux-icons: Icon set for roles that use ux:icon (optional per app)
This package is auto-updated.
Last update: 2026-06-22 23:09:33 UTC
README
UX Blocks
Registry schema and shared test helpers for the Symfinity UX Blocks component family
Note
Read-only mirror. See CONTRIBUTING.md.
Features
- Registry schema — version
1.4with default fragment prefixblocks, modifier/scalar lexicons, and closed region vocabulary - Composition language —
CompositionLanguage,RoleLanguageDefinition, andLanguageConformancehelpers for tier registry rows - Tier role catalogs — canonical role lists for core, extended, interactive, live, marketing, ecommerce, and lab packages
- PHPUnit assertions —
BlocksMarkupAssertionsfordata-ui-roleanddata-ui-fragmentDOM checks - Slim SDK boundary — no Twig components here; tiers ship in
symfinity/ux-blocks-*packages - Symfony Flex recipe — bundle registered for all environments
Prerequisites
Add the symfinity/recipes Flex endpoint to your project's composer.json (see recipes README) — recipes are not in Symfony's official recipe repository yet.
Installation
composer require symfinity/ux-blocks
Usually installed as a dependency of a tier package. See Installation.
Quick start
use Symfinity\UxBlocks\Registry\CoreRoleCatalog; use Symfinity\UxBlocks\Registry\RegistrySchema; $fragment = RegistrySchema::fragmentId('button'); // blocks.button $roles = CoreRoleCatalog::roles();
composer require symfinity/ux-blocks-core
See Quick start for PHPUnit markup assertions and tier pairing.
Install profiles
Pick the smallest profile that fits your app. Marketing, ecommerce, and lab tiers are explicit opt-in — they are never pulled in by symfinity/ux-blocks-full.
| Profile | composer require |
Use case |
|---|---|---|
| Headless atoms | symfinity/ux-blocks-core |
Custom CSS; no UI Kernel theme |
| Headless + forms | symfinity/ux-blocks-core symfinity/ux-blocks-form |
Atoms plus form controls |
| Kernel-styled app | symfinity/ui-kernel symfinity/ux-blocks-core |
Symfinity default styled atoms |
| Kernel-styled app + forms | symfinity/ui-kernel symfinity/ux-blocks-core symfinity/ux-blocks-form |
Typical CRUD apps |
| Full app UI | symfinity/ux-blocks-full |
Admin/product shell (core + form + extended + interactive) |
| Full + live | symfinity/ux-blocks-full symfinity/ux-blocks-live |
Adds Turbo/LiveComponent tier |
| Vertical landing | … symfinity/ux-blocks-marketing |
Marketing sections — opt-in |
| Vertical shop | … symfinity/ux-blocks-ecommerce |
Shop sections — opt-in |
| Incubator lab | symfinity/ux-blocks-lab |
Experimental roles — not for production defaults |
# Headless atoms composer require symfinity/ux-blocks-core # Kernel-styled app composer require symfinity/ui-kernel symfinity/ux-blocks-core # Full app UI (core + extended + interactive) composer require symfinity/ux-blocks-full
data-ui-roleis injected by the role attribute bridge (core tier and above).data-ui-fragmentis off by default; enable in tier config when you need Turbo/runtime fragment ids.
Documentation
- Quick start — registry helpers and test trait
- Installation — Flex and manual setup
- Configuration — no app YAML required
- Usage — registry helpers and PHPUnit assertions
- Registry — schema, catalogs, markup contract
- Components — tier packages and styling
- Upgrade — version migration
Requirements
- PHP 8.2 or higher
- Symfony 7.4 or 8.x