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
This project provides a custom Thymeleaf dialect to simplify the creation and customization of GOV.UK-styled buttons. Using this custom dialect, developers can generate button HTML elements with the GOV.UK Design System's standards, reducing repetitive boilerplate code and ensuring consistency.
4
+
5
+
This project provides a custom Thymeleaf dialect to simplify the creation and customization of GOV.UK-styled buttons.
6
+
Using this custom dialect, developers can generate button HTML elements with the GOV.UK Design System's standards,
7
+
reducing repetitive boilerplate code and ensuring consistency.
5
8
6
9
---
7
10
8
11
## Installation
12
+
9
13
To use this custom Thymeleaf dialect, add the following dependency to your `build.gradle` file:
Writing GOV.UK-styled buttons often involves verbose and repetitive HTML, especially when handling attributes like `class`, `id`, `data-*`, or conditional rendering logic. With this custom dialect, you can declare buttons using clean, concise tags like:
24
+
25
+
Writing GOV.UK-styled buttons often involves verbose and repetitive HTML, especially when handling attributes like
26
+
`class`, `id`, `data-*`, or conditional rendering logic. With this custom dialect, you can declare buttons using clean,
The `DetailsElementTagProcessor` is a custom Thymeleaf tag processor that enables the use of a `<govuk:details>` tag to generate a `<details>` HTML element styled with the GOV.UK Design System classes.
84
+
The `DetailsElementTagProcessor` is a custom Thymeleaf tag processor that enables the use of a `<govuk:details>` tag to
85
+
generate a `<details>` HTML element styled with the GOV.UK Design System classes.
68
86
69
87
#### Features
88
+
70
89
- Generates a `<details>` element with the `govuk-details` class.
71
90
- Includes a `<summary>` element with a customizable summary text.
72
91
- Includes a `<div>` element for detailed content.
73
92
74
93
#### Usage
94
+
75
95
To use this processor, define a `govuk:details` tag in your Thymeleaf templates and provide the following attributes:
76
96
77
97
-**`summaryText`**: The text displayed in the summary section of the `<details>` element.
78
98
-**`text`**: The content displayed inside the `<div>` when the details are expanded.
79
99
80
100
#### Example
101
+
81
102
```html
103
+
82
104
<govuk:detailssummaryText="Click to view details"text="This is the detailed content."></govuk:details>
105
+
```
106
+
107
+
### MOJ Date picker Element Tag Processor
108
+
109
+
The `moj:datepicker` custom tag renders a date picker component using the GOV.UK Design System styles and behavior. This
110
+
component is useful for capturing date inputs in a standardized format.
111
+
112
+
---
113
+
114
+
### Parameters
115
+
116
+
| Parameter | Type | Description | Default Value |
Copy file name to clipboardexpand all lines: laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/src/main/java/uk/gov/laa/ccms/springboot/dialect/GovUkThymeleafDialectConfig.java
+5
Original file line number
Diff line number
Diff line change
@@ -19,4 +19,9 @@ public GovUkDialect govUkDialect() {
Copy file name to clipboardexpand all lines: laa-ccms-spring-boot-starters/laa-ccms-spring-boot-starter-govuk-dialect/src/test/java/uk/gov/laa/ccms/springboot/dialect/ThymeleafTestConfig.java
+1
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ public class ThymeleafTestConfig {
0 commit comments