Skip to content

Commit

Permalink
CCMSPUI-466 | Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkumar461 committed Dec 13, 2024
1 parent 0f22908 commit da4d4a5
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,23 @@ This ensures that all attributes, including conditional and computed values, are
<govuk:button th:text="'Click Me!'" href="'/test'" id="'button-id'" classes="'custom-class'"/>
</body>
</html>
```
```

### Details Element Tag Processor

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.

#### Features
- Generates a `<details>` element with the `govuk-details` class.
- Includes a `<summary>` element with a customizable summary text.
- Includes a `<div>` element for detailed content.

#### Usage
To use this processor, define a `govuk:details` tag in your Thymeleaf templates and provide the following attributes:

- **`summaryText`**: The text displayed in the summary section of the `<details>` element.
- **`text`**: The content displayed inside the `<div>` when the details are expanded.

#### Example
```html
<govuk:details summaryText="Click to view details" text="This is the detailed content."></govuk:details>

0 comments on commit da4d4a5

Please sign in to comment.