You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/twig-component/README.md
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
-
# HTML Component Bundle
1
+
# HTML5 Elements as Twig Components
2
2
3
-
Symfony UX Twig Components for all HTML5 elements with ARIA support.
3
+
Symfony UX Twig Components for all HTML5 elements with ARIA support, Enum validation for consistency and enforcing valid HTML5. Classes and templates as generated from the HTML5 specifications. This bundle is part of the [Extended HTMLDocument](https://github.com/vardumper/extended-htmldocument) library built ontop of PHP's DOM\HTMLDocument.
4
+
5
+
## Requirements
6
+
* PHP 8.4 – the underlying Extended HTMLDocument library is built upon PHPs DOM\HTMLDocument which is available since PHP 8.4+
7
+
8
+
Since only the Enums are used for attribute validation here, adding support for older PHP versions could be done easily if it's needed or requested.
4
9
5
10
## Installation
6
11
@@ -22,7 +27,7 @@ return [
22
27
];
23
28
```
24
29
25
-
Next, configure tell Symfony where to find your component atoms by adding this path to`config/packages/twig_component.yaml`.
30
+
Next, tell Symfony that Twig Components can be found in a new path. Edit`config/packages/twig_component.yaml` and add the following:
26
31
27
32
```yaml
28
33
# config/packages/twig_component.yaml
@@ -62,4 +67,15 @@ Use any HTML element as a Twig Component:
62
67
Components are organized by type:
63
68
-`Block` - Block-level elements (div, section, article, etc.)
64
69
-`Inline` - Inline elements (span, a, strong, etc.)
65
-
-`Void` - Self-closing elements (img, input, br, etc.)
70
+
-`Void` - Self-closing elements (img, input, br, etc.)
0 commit comments