DEV Community

Discussion on: You don't need... JavaScript to do tabs

jonosellier profile image
jonosellier Author

I like using :target for routing (spoilers for the next article! 🤫) but I also don't have a good way of doing active states nicely.

I was thinking of showing it being done with a bunch of copies of tabs where 1 is manually marked as active with a class so the Tab and Tab Content is swapped based on active state. I decided not to because it's a lot of repetition.