1.3.0 • Published 2 years ago

@forter/accordion v1.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

fc-accordion

An element by Forter

Usage

<script>
   import '@forter/accordion';
</script>

<fc-accordion>
   <fc-accordion-category label="galaxy">
     S10
     S20
   </fc-accordion-category>
   <fc-accordion-category label="iphone">
     X
     XS
   </fc-accordion-category>
</fc-accordion>
  • Examples

<!-- section example open -->
<fc-accordion>
   <fc-accordion-section open>
     <section slot="label" style="display: flex; align-items: center;">
       <fc-counter-circle completed="2" total="4" style="margin-right: 15px;">
       </fc-counter-circle>
       <span style="font-size: 22px;">Integration Overview</span>
     </section>
     <div part="content">
       <fc-card>
         Accordion Content
       </fc-card>
       <fc-card>
         Accordion Content
       </fc-card>
     </div>
   </fc-accordion-section>
</fc-accordion>

<!-- section example -->
<fc-accordion>
   <fc-accordion-section>
     <section slot="label" style="display: flex; align-items: center;">
       <fc-counter-circle completed="12" total="16" style="margin-right: 15px;">
       </fc-counter-circle>
       <span style="font-size: 22px;">Phase 1</span>
     </section>
     <div part="content">
       <fc-card>
         Accordion Content
       </fc-card>
       <fc-card>
         Accordion Content
       </fc-card>
     </div>
   </fc-accordion-section>
</fc-accordion>

<!-- disabled section example -->
<fc-accordion>
   <fc-accordion-section disabled>
     <section slot="label" style="display: flex; align-items: center;">
       <fc-counter-circle completed="0" total="4" style="margin-right: 15px;">
       </fc-counter-circle>
       <span style="font-size: 22px;">Phase 2</span>
     </section>
     <div part="content">
     </div>
   </fc-accordion-section>
</fc-accordion>

CSS Custom Properties

PropertyDescription
--fc-accordion-section-background-colorheader background color. example: var(--pink-1)
--fc-accordion-section-border-colorborder color. example: var(--cyan-2)
--fc-accordion-section-border-radiusborder-radius. example: 10px
--fc-accordion-section-disabled-colordisabled font color. example: var(--red-1)
--fc-accordion-section-font-colorheader font color. example: var(--indigo-9)
--fc-accordion-section-icon-colorarrow icon color. example: var(--indigo-7)
--fc-accordion-section-open-background-coloropen background color. example: var(--indigo-1)
--fc-accordion-section-paddingsection padding. example: 10px