0.1.0 • Published 3 years ago

@simplr-wc/accordion v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Simplr Accordion

Usage

import '@simplr-wc/accordion';
<simplr-accordion label="Accordion 1" icon="code">
  <simplr-container>
    <h2>This is the Accordion content pane</h2>
    <p>This pane can contain anything from text to images to whatever you can imagine</p>
    <p>Lorem ipsum and so on</p>
  </simplr-container>
</simplr-accordion>
<simplr-accordion label="Accordion 2 (No Icon)">
  <simplr-container>
    <h2>This is the Accordion content pane</h2>
    <p>This pane can contain anything from text to images to whatever you can imagine</p>
    <p>Lorem ipsum and so on</p>
  </simplr-container>
</simplr-accordion>
<simplr-accordion label="Accordion 3 (Background color when open)" openBackgroundColor="red">
  <simplr-container>
    <h2>This is the Accordion content pane</h2>
    <p>This pane can contain anything from text to images to whatever you can imagine</p>
    <p>Lorem ipsum and so on</p>
  </simplr-container>
</simplr-accordion>

Properties

PropertyAttributeTypeDefaultDescription
backgroundColorbackgroundColorstring"#FFFFFF"Background color of the accordion header
hasAccordionAbovehasAccordionAbovebooleanfalse
hasAccordionBelowhasAccordionBelowbooleanfalse
iconiconstring""Icon shown in the header of accordion
labellabelstring""Label of the accordion
openopenbooleanfalseIs the accordion open?
openBackgroundColoropenBackgroundColorstring"backgroundColor"Backgroundcolor of the header when the accordion is open

Methods

MethodType
toggle(): void