Skip to main content

Overview

The Accordion block provides collapsible content panels that can contain any nested blocks. It consists of two components:
  1. Accordion Container (accordion.liquid) - The parent wrapper with styling settings
  2. Accordion Row (_accordion-row.liquid) - Individual collapsible rows

Accordion Container

Schema Definition

The accordion container only accepts accordion row blocks:

Container Settings

select
default:"caret"
Icon style for expand/collapse indicator
  • caret - Arrow icon
  • plus - Plus/minus icon
checkbox
default:"true"
Show divider lines between accordion rows
select
default:"h6"
Typography preset for accordion headings
  • “ - Default
  • paragraph - Paragraph style
  • h1 through h6 - Heading styles
checkbox
default:"true"
Inherit color scheme from parent section
color_scheme
default:"scheme-1"
Color scheme when not inheriting

Border Settings

select
default:"none"
Border style
  • none - No border
  • solid - Solid border
range
default:"1"
Border thickness (0-100px, visible when border is not “none”)
range
default:"100"
Border opacity (0-100%, visible when border is not “none”)
range
default:"0"
Border radius (0-100px)

Padding Settings

range
default:"0"
Top padding (0-100px)
range
default:"0"
Bottom padding (0-100px)
range
default:"0"
Left padding (0-100px)
range
default:"0"
Right padding (0-100px)

Accordion Row

Row Settings

text
default:"Accordion heading"
Text displayed in the row header
checkbox
default:"false"
Open this row by default on page load

Icon Settings

select
default:"none"
Optional icon displayed before the heading text. Supports 50+ icons including:
  • none - No icon
  • Social icons: facebook, instagram, twitter, youtube, etc.
  • E-commerce icons: cart, box, truck, return
  • Product icons: shirt, shoe, bottle, lipstick
  • General icons: heart, star, check_box, lightning_bolt
image_picker
Custom image icon (alternative to built-in icons)
range
default:"20"
Icon width (12-200px)

Liquid Implementation

Accordion Container

Accordion Row

CSS Classes

Container Classes

  • .accordion - Main accordion wrapper
  • .accordion--dividers - Enables divider lines between rows
  • .accordion--caret / .accordion--plus - Controls which icon is visible
  • .border-style - Border styling
  • .spacing-style - Padding utilities

Row Classes

  • .details - Native HTML details element
  • .details__header - Clickable summary/header
  • .details__icon - Icon container
  • .details-content - Collapsible content area
  • .icon-animated - Animated expand/collapse icon

Preset Configuration

Default preset with three rows:

Usage Examples

Product FAQ Accordion

Shipping Information

Source Code Reference

  • Accordion Container: /source/blocks/accordion.liquid:1-312
  • Accordion Row: /source/blocks/_accordion-row.liquid:1-355