There is a sidebar menu and a button which shows/hides the sidebar. The problem is that I don't know how to make it slide in from the left when it appears. Also to slide back to the right of the screen when it is closing.
Here is my code so far:
const myClass = clsx({
'transition duration-300 h-screen mt-5 fixed z-10 left-0 w-80 ': true,
'opacity-0': open,
'opacity-100': !open
});
....
return (
<div className='w-8 h-8'>
<button onClick={toggleSideBar}></button>
<div className={containerClasses}>
...
</div>
</div>
);
I guess it should be added something with respect to isOpened, when it is closed or opened, tried with Tailwind's transition property but it didn't work out.