Skip to main content

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

NameDescriptionTypeDefault
headerText displayed in the headerString''

Methods

NameDescription
toggleAccordion()Toggles the display of the accordion content.