barbajs/barba
barbajs/barba has 12,997 GitHub stars and 495 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-06 01:13 UTC. Last push 2024-12-02.
Create badass, fluid and smooth transitions between your website’s pages
What you can do
- Simplified API - written in TypeScript and works with Promises
- Cross-browser support - progressive enhancement for modern browsers
- DOM flexibility - custom markup, namespaces and data attribute schema
- Hook system - regulars lifecycle methods for Transitions and Views
Measured star growth
- in 24h
- +1
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalbarba.js –

Create badass, fluid and smooth transitions between your website’s pages.
Intro
Barba.js — aka Barba — is a small (7kb minified and compressed) and easy-to-use library that helps you create fluid and smooth transitions between your website's pages. It makes your website run like a SPA (Single Page Application) and help reduce the delay between your pages, minimize browser HTTP requests and enhance your user's web experience.
Features
Barba is user friendly, smart, extensible and futureproof. The library provides a bunch of useful features that will make your website shine like any other website, ever!
- Simplified API - written in TypeScript and works with
Promises - Cross-browser support - progressive enhancement for modern browsers
- DOM flexibility - custom markup, namespaces and
dataattribute schema - Hook system - regulars lifecycle methods for
TransitionsandViews - Transition resolution - rules that let Barba pick the right transition
- Sync mode - indicates whether leave and enter hooks should “play together”
- Page related code - custom logic attached to a specific
View - Modern browser strategies - keep your site run as fast as possible
- Cook like an expert - improve your development workflow
- Built-in utilities - brought to you with a bunch of useful methods
- Plugin system - supplied with useful plugins
- Wide community - more than 980+ amazing developers can help build your website!
Documentation
Here you will find the documentation describing how to use the library.
- Website - official Barba website
- User guide - how to install and use the plugin
- Lessons, courses and videos - for in-depth learning
- Showcase - selected works made with Barba
- Developer API - by developers, for developers
[!NOTE] This guide assumes intermediate knowledge of HTML, CSS, and JavaScript. It is worth mentioning that all code examples use ES6+ syntax. If you are not comfortable with this syntax, we would encourage you to grasp the basics then come back.
In case of emergency, check the "legacy" code example.
Sponsor
If you like this library and want to give some recognition, it is now possible to become a Github sponsor and support this project by sponsoring BarbaJS maintainer on Github. Even if it's a small contribution, you participate in the effort of making open source projects maintained for anyone, and developers to be rewarded for their work/time.
Contribute
If you want to report a bug or request a new feature/improvement, please read the project contributors guidelines before.
Thanks for taking time to contribute to Barba :tada: :+1:
Contributors
License
The project is developed under the MIT license:
- Permissions: This software and derivatives may be used for commercial purposes, you may distribute this software, this software may be modified and you may use and modify the software without distributing it.
- Conditions: Include a copy of the license and copyright notice with the code.
- Limitations: Software is provided without warranty and the software author/license owner cannot be held liable for damages.
Read the full license for more information about your rights.
Explore related projects
ytdl-org/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
141,460 starsexcalidraw/excalidraw
Virtual whiteboard for sketching hand-drawn like diagrams
135,211 starsgodotengine/godot
Godot Engine – Multi-platform 2D and 3D game engine
119,611 starsmrdoob/three.js
JavaScript 3D Library.
117,669 stars