Menu
All plugins

Responsive Grid for Bricks

Turn any grid of cards into a one card swipe slider or an accordion at a breakpoint you choose. Above the breakpoint your grid is untouched. It works on any container, block or div, so you keep full control of the grid styling in Bricks.

Open the live demo

n

Using it

  • Build your grid on a container with the cards as its direct children.
  • Open the Responsive grid group on that container and pick a breakpoint, one of the Bricks breakpoints, a custom width or always.
  • Choose Slider or Accordion mode.

n

Slider mode

  • Shows one card at a time and swipes with native scroll snapping.
  • Dots and arrows are optional, so you can show only dots underneath.
  • Peek shows a sliver of the next card. It is 0 by default, so only one card is visible.
  • Left and right arrow keys work when the slider has focus.

n

Accordion mode

  • The first child of each card becomes the header and the rest becomes the content.
  • Start with all closed or the first open, and choose whether several can stay open.
  • Optional chevron on the right of each header. Opening and closing is animated and works with the keyboard.

n

Good to know

  • The grid comes back, with its original markup, when the screen is wider than the breakpoint.
  • An brg/accordion/changed event fires when an accordion item opens or closes.