Reputation: 69
I have built the following interface using only the utility classes available in Tailwind css. When a down icon is hovered, the following menu correctly expands downwards:
My problem is with the up icon. When it is hovered, it also expands downward - I would like for it to expand upward but am struggling to figure out how to do so. Here is my current implementation (syntax is React/JSX):
<div className="flex flex-col w-auto h-6 text-xl transition duration-300 transform transition-height hover:h-40 overflow-hidden ease-out">
{colors.reverse().map((color) => (
<div
className={`text-${color}-400 w-6 h-6 rounded-full transform hover:cursor-pointer hover:bg-${color}-200 text-center`}
>
<FontAwesomeIcon icon={icon} />
</div>
))}
</div>
In addition to expanding upwards, I would also like for it to not push the preceding div/content further up, but instead to "overlay" its contents.
Upvotes: 0
Views: 3123