Today I created the Navbar component for my web3 app and in the process saw the true utility of Tailwind CSS. The app must be responsive and mobile friendly, so on desktop the entire Navbar will appear with links, while on mobile there will be an icon to tap that expands into a navbar and can be collapsed again. With Tailwind CSS we can create this without directly using any CSS media queries. Tailwind allows us to put classes directly in our JSX that selectively apply to certain screen sizes. Using this to hide the Navbar selectively based on screen size, combined with React state to track if the mobile navbar is to be displayed or hidden, allows us to create a responsive app for desktop and mobile with a minimum amount of complexity.
Subscribe to:
Post Comments (Atom)
190: Sablier
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The ZKasino project recently exit scammed over 33 million dollars worth of Ethereum. he recent debacle surrounding ZKasino offers valuable...
-
In addition to its native SDK, Hedera also supports smart contracts in a platform compatible with the Ethereum Virtual Machine. This allows ...
No comments:
Post a Comment