Este código JSX representa un componente React que utiliza Tailwind CSS para estilizar la barra lateral y sus elementos en una aplicación Next.js. Asegúrate de tener configurado Tailwind CSS en tu proyecto Next.js para que estas clases funcionen correctamente.
← Return to game
Comments
Log in with itch.io to leave a comment.
K;K
https://github.com/MdUsmanAnsari/collapsible-sidebar-in-nextjs
const App = () => {
const [open, setOpen] = useState(true);
const Menus = [
{ title: "Dashboard", src: "Chart_fill" },
{ title: "Inbox", src: "Chat" },
{ title: "Accounts", src: "User", gap: true },
{ title: "Schedule ", src: "Calendar" },
{ title: "Search", src: "Search" },
{ title: "Analytics", src: "Chart" },
{ title: "Files ", src: "Folder", gap: true },
{ title: "Setting", src: "Setting" },
];
return (
<div className="flex">
<div
className={` ${
open ? "w-72" : "w-20 "
} bg-dark-purple h-screen p-5 pt-8 relative duration-300`}
>
<img
src="./src/assets/control.png"
className={`absolute cursor-pointer -right-3 top-9 w-7 border-dark-purple
border-2 rounded-full ${!open && "rotate-180"}`}
onClick={() => setOpen(!open)}
/>
<div className="flex gap-x-4 items-center">
<img
src="./src/assets/logo.png"
className={`cursor-pointer duration-500 ${
open && "rotate-[360deg]"
}`}
/>
<h1
className={`text-white origin-left font-medium text-xl duration-200 ${
!open && "scale-0"
}`}
>
Designer
</h1>
</div>
<ul className="pt-6">
{Menus.map((Menu, index) => (
<li
key={index}
className={`flex rounded-md p-2 cursor-pointer hover:bg-light-white text-gray-300 text-sm items-center gap-x-4
${Menu.gap ? "mt-9" : "mt-2"} ${
index === 0 && "bg-light-white"
} `}
>
<img src={`./src/assets/${Menu.src}.png`} />
<span className={`${!open && "hidden"} origin-left duration-200`}>
{Menu.title}
</span>
</li>
))}
</ul>
</div>
<div className="h-screen flex-1 p-7">
<h1 className="text-2xl font-semibold ">Home Page</h1>
</div>
</div>
);
};
export default App;
Aquí tienes el código HTML y CSS convertido a JSX con Tailwind CSS para Next.js:
```jsx
import React from 'react';
const Sidebar = () => {
return (
<div className="sidebar w-60 h-screen p-10 bg-white transition-transform ease-in-out duration-300 overflow-hidden hover:w-200">
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon1" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">The App</div>
</div>
<hr className="my-6 border-t-2 border-gray-300" />
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon2" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">Dashboard</div>
</div>
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon3" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">Search</div>
</div>
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon4" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">Insights</div>
</div>
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon4" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">Docs</div>
</div>
<div className="item flex items-center my-20">
<img className="icon w-40 h-35 flex-shrink-0 fill-#424242" src="/icon5" />
<div className="text opacity-0 transition-opacity duration-300 transition-delay-200 ml-6 whitespace-nowrap">Settings</div>
</div>
</div>
);
};
export default Sidebar;
```
Este código JSX representa un componente React que utiliza Tailwind CSS para estilizar la barra lateral y sus elementos en una aplicación Next.js. Asegúrate de tener configurado Tailwind CSS en tu proyecto Next.js para que estas clases funcionen correctamente.
https://linktr.ee/Sumchloe
https://www.instagram.com/p/CwJPUaxRMSw/?img_index=1
https://www.nudeclap.com/es/clips/fuck-love-squirting-that-wall-woman/?nudclps=1...
https://beacons.ai/sweetgirllouisehttps://beacons.ai/sweetgirllouise
lol go dude
yyyyy
ruler smacked