I've been challenged with developing my own React Tabs
component that includes a sliding animation, similar to what you see in mui or ant design.
I can achieve this using JavaScript, however, the limitation is that I cannot use CSS within JavaScript or inline CSS. Therefore, it must be purely SCSS / CSS in a Next.js project. Another complication is that the tabs need to be responsive (without fixed width), so the container is set to flex
and can contain multiple tab items with varying widths. This makes it challenging to determine the item's width using pure CSS alone.
Is it feasible to create such an animation without relying on any JavaScript?