A meticulously crafted folder-open animation, built in pure CSS.
No JavaScript. No dependencies. Just a smooth, satisfying micro-interaction you can drop into any project.
Folder Hover is a lightweight CSS component that recreates the tactile, satisfying feeling of a folder opening — triggered entirely by :hover. It's built for developers who want a polished detail without pulling in an animation library or a single line of JavaScript.
Drop it into a file manager UI, a dashboard, a portfolio, or a landing page — anywhere a small moment of delight belongs.
Keywords: CSS animation · hover effect · HTML CSS component · frontend UI · micro-interaction · modern UI · responsive design · open source frontend component
|
Carefully tuned easing curves and timing make the folder open and close without a hint of jank. |
Pure HTML & CSS. No build step, no npm install, no framework required. |
|
Colors, speed, sizing, and spacing are all exposed as CSS variables. |
Scales cleanly across breakpoints — from mobile to widescreen. |
|
Clean, commented markup and styles — easy to read, easy to extend. |
A few KB of CSS. No render-blocking scripts, no layout shift. |
Every visual property is controlled through CSS custom properties defined at the top of style.css. Override them in your own stylesheet, or edit them directly:
:root {
--folder-color: #4a90e2; /* primary folder color */
--folder-accent: #f5a623; /* inner tab / accent color */
--animation-speed: 0.35s; /* open/close transition duration */
--animation-easing: ease-in-out;
--folder-size: 120px; /* base folder width */
--folder-spacing: 24px; /* gap between multiple folders */
}| Variable | Controls | Default |
|---|---|---|
--folder-color |
Base folder color | #4a90e2 |
--folder-accent |
Tab / highlight color | #f5a623 |
--animation-speed |
Duration of the open/close transition | 0.35s |
--animation-easing |
Timing function for the motion | ease-in-out |
--folder-size |
Width of the folder element | 120px |
--folder-spacing |
Spacing between adjacent folders | 24px |
| Chrome | Firefox | Safari | Edge | Opera |
|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ |
Built on standard CSS transitions and transforms — no vendor-specific hacks required.
- No dependencies — nothing to install, nothing to bundle.
- No JavaScript — the entire interaction is driven by CSS
:hover. - Minimal footprint — a few kilobytes of styling, nothing more.
- Fast rendering — GPU-accelerated transforms keep the animation smooth.
- Responsive — adapts cleanly to any screen size out of the box.
This component is an educational recreation built to practice and demonstrate CSS animation techniques. It is not a copy of any single proprietary design, and no ownership is claimed over any original concept it may resemble. If you recognize a specific design this draws from, please open an issue and it will be credited here.
Contributions are welcome and appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to your branch (
git push origin feature/your-feature) - Open a Pull Request
Please keep changes focused and consistent with the existing code style. For larger changes, open an issue first to discuss what you'd like to change.
Released under the MIT License. Free to use in personal and commercial projects.
If this project saved you time or sparked an idea, a star helps it reach more developers looking for the same thing.
