# Accordion

# Most common usage scenario

NOT YET DOCUMENTED

This section is not fully documented yet. We are doing our best to make our documentation a good and complete source of knowledge about Storefront UI. If you would like to help us, please don't hesitate to contribute to our docs. You can read more about it here.

# Props

  • firstOpen

    • Opens the first accordion item if set to "true"
    • type: boolean
    • defaultValue: false
  • multiple

    • Allows to open multiple accordion items if set to "true"
    • type: boolean
    • defaultValue: false
  • transition

    • Overlay transition effect
    • type: string
    • defaultValue: "fade"
  • showChevron

    • type: boolean
    • defaultValue: true

# Slots

  • default
    • default slot to setup SfAccordionItem elements

# Events

None.

# CSS modifiers

  • .sf-accordion--has-chevron

# SCSS variables

$accordion-font-family: $body-font-family-secondary !default;
$accordion-font-size: $font-size-regular-mobile !default;
$accordion-font-size-desktop: $font-size-regular-desktop !default;
$accordion-font-weight: $body-font-weight-secondary !default;
$accordion-line-height: 1.6 !default;
$accordion__title-padding-y: 0.625rem !default;
$accordion__title-font-size: $font-size-big-mobile !default;
$accordion__title-font-size-desktop: $font-size-big-desktop !default;
$accordion__content-padding-y: 1.875rem !default;

You can override SCSS variable values bound to this component in sfui.scss in the root of your project.

# Internal components

# AccordionItem

# Props

  • header
    • type: string
    • defaultValue: ""

# Slots

  • header

    • bindings: header, isOpen, accordionClick, showChevron
  • default

# Events

None.

# CSS modifiers

None.

# SCSS variables

None.

# Partials

If you want to customize this component even more you can use its partials for limitless customization.

<template lang="html" src="@storefront-ui/vue/src/components/organisms/SfAccordion/SfAccordion.html"></template>
<script src="@storefront-ui/vue/src/components/organisms/SfAccordion/SfAccordion.js"></script>
<style lang="scss">
@import "~@storefront-ui/shared/styles/components/SfAccordion.scss";
</style>

You can read about using component partials here

# Play with this component

See all available configurations and play with this component on Storybook.