Options for implementing responsive tabs

Created on 11 January 2021, almost 4 years ago
Updated 29 March 2023, over 1 year ago

We (the State of Missouri) have need of tabs that collapse to accordions at mobile widths on several of our sites. In the related issue (3069087), I tried implementing such a formatter using the Easy Responsive Tabs to Accordions library (https://github.com/samsono/Easy-Responsive-Tabs-to-Accordion), but it's old and possibly abandoned.

I imagine this isn't an uncommon need, so I figure it's worth looking for an acceptable implementation. I'd be happy to try to build it, but some input on acceptable methods would be helpful. Some ideas:

  • Work around the problem. Set up two blocks -- one with tabs, one with accordions -- and use classes on them to hide/show based on browser width. This works (we used it in the past, before using the aforementioned library), but it's far from ideal.
  • Implement using another library. This needs to be maintained, and available on packagist.org (question -- would assets-packagist.org be an acceptable alternative?). I'm looking for candidates.
  • Implement directly within the module. There are a number of methods described in various codepens and the like. They'd need to be tested for both functionality and accessibility.

Thoughts on this would be appreciated.

✨ Feature request
Status

Closed: outdated

Version

3.0

Component

Tab styles

Created by

πŸ‡ΊπŸ‡ΈUnited States wrd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024