Accordion
The ty-accordion component provides a flexible way to display and hide content. It's useful for organizing information efficiently, especially in FAQs, product descriptions, or any content that benefits from a concise presentation.
Usage
Here's how to use the ty-accordion component in your HTML code:
Live Editor
<ty-accordion header="Accordion Title"> Your content here... </ty-accordion>
Result
Loading...
API
The ty-accordion component accepts the following properties:
Properties
| Name | Description | Type | Default |
|---|---|---|---|
| header | Text displayed in the header | String | '' |
Methods
| Name | Description |
|---|---|
| toggleAccordion() | Toggles the display of the accordion content. |