File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
docs/starter-template/components Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ # Accordion Documentation
2+
3+ ## Brief Description
4+
5+ Accordion is a React component that creates an expandable and collapsible accordion section, ideal for displaying content in a compact, organized manner.
6+
7+ ## Usage
8+
9+ The accordion can contain any markdown content you wish to display.
10+
11+ ``` jsx
12+
13+
14+ function MyComponent () {
15+ return (
16+ < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IlNlY3Rpb24gVGl0bGUiPgogICAgICB7LyogWW91ciBjb250ZW50IGhlcmUgKi99CiAgICA8L0RldkRvY3NBY2NvcmRpb24+" props= " eyJ0aXRsZSI6IlNlY3Rpb24gVGl0bGUiLCJjaGlsZHJlbiI6InsvKiBZb3VyIGNvbnRlbnQgaGVyZSAqL30ifQ==" >< / component>
17+ );
18+ }
19+ ```
20+
21+ ## Parameters
22+
23+ * ` title ` (string, required): The text to display as the accordion's header.
24+
25+ * ` children ` (React node, required): The content to be displayed when the accordion is expanded.
26+
27+ ## Return Value
28+
29+ Accordion returns a React component that renders an accordion UI element.
30+
31+ ## Examples
32+
33+ ### Basic Usage
34+
35+ ``` jsx
36+ < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IkdldHRpbmcgU3RhcnRlZCI+CiAgPHA+VGhpcyBpcyB0aGUgY29udGVudCBvZiB0aGUgYWNjb3JkaW9uLiBJdCBjYW4gaW5jbHVkZSBhbnkgdmFsaWQgSlNYLjwvcD4KPC9EZXZEb2NzQWNjb3JkaW9uPg==" props= " eyJ0aXRsZSI6IkdldHRpbmcgU3RhcnRlZCIsImNoaWxkcmVuIjoiPHA+VGhpcyBpcyB0aGUgY29udGVudCBvZiB0aGUgYWNjb3JkaW9uLiBJdCBjYW4gaW5jbHVkZSBhbnkgdmFsaWQgSlNYLjwvcD4ifQ==" >< / component>
37+ ```
38+
39+ ### With Multiple Paragraphs
40+
41+ ``` jsx
42+ < component name= " DevDocsAccordion" original= " PERldkRvY3NBY2NvcmRpb24gdGl0bGU9IkFkdmFuY2VkIFRvcGljcyI+CiAgPHA+Rmlyc3QgcGFyYWdyYXBoIG9mIGNvbnRlbnQuPC9wPgogIDxwPlNlY29uZCBwYXJhZ3JhcGggd2l0aCBtb3JlIGRldGFpbHMuPC9wPgogIDx1bD4KICAgIDxsaT5MaXN0IGl0ZW0gMTwvbGk+CiAgICA8bGk+TGlzdCBpdGVtIDI8L2xpPgogIDwvdWw+CjwvRGV2RG9jc0FjY29yZGlvbj4=" props= " eyJ0aXRsZSI6IkFkdmFuY2VkIFRvcGljcyIsImNoaWxkcmVuIjoiPHA+Rmlyc3QgcGFyYWdyYXBoIG9mIGNvbnRlbnQuPC9wPlxuICA8cD5TZWNvbmQgcGFyYWdyYXBoIHdpdGggbW9yZSBkZXRhaWxzLjwvcD5cbiAgPHVsPlxuICAgIDxsaT5MaXN0IGl0ZW0gMTwvbGk+XG4gICAgPGxpPkxpc3QgaXRlbSAyPC9saT5cbiAgPC91bD4ifQ==" >< / component>
43+ ```
44+
45+ ## Notes or Considerations
46+
47+ * The accordion is collapsible by default, meaning it can be opened and closed by clicking on the title.
48+
49+ * Only one accordion section can be open at a time within a group of Accordion components.
50+
51+ * The content inside the accordion supports Markdown formatting, allowing for rich text representation.
52+
53+ * Ensure that the content passed to Accordion is not too lengthy, as very long content may affect user experience.
54+
55+ * The component automatically handles the styling and behavior of the accordion, including the expand/collapse animation.
You can’t perform that action at this time.
0 commit comments