Category carousel only on mobile

Some forums/communities probably don’t benefit much on having an easy access to categories on mobile, because they are more focused on being a support forum, but for what I’m building, seeing the categories is very important. Clicking the menu bar is not so intuitive, especially for people who use Discord, and from what I read, adding a swipe gesture is not ideal (at least that’s what I got from reading a thread).

Can I go from this:

to something like this?

Not being a developer, I don’t know the ins and outs, but with some help from ChatGPT and Claude, I’ve been able to create some custom components and one of them was to inject some stuff here and there via JavaScript.

My question in this case is more related to:
Is there a way to grab the list of the current categories displayed in the sidebar? Or maybe the list of all categories to let JavaScript use that?

2 Likes

I would use Header Categories Navbar as an example for your component.

4 Likes

Because that is user-customizable, so perhaps not… [1] but you can get all the categories of the site, yes.


  1. Unless, of course, one uses JavaScript to loop through each element in that section, but that’ll be quite inefficient. ↩︎

1 Like

Awesome! :handshake:

Exactly what I wanted! With just a few CSS tweaks, it 's looking great!

The component provided by @Moin did the trick. Exactly what I wanted.