State-based routing for JavaScript SPAs
A framework-agnostic routing library with hierarchical states, powerful transitions, and flexible URL management. The foundation for UI-Router implementations across Angular, React, and more.
Quick start
Get UI-Router Core running in your project in minutes
Create a router instance
Import and instantiate the UIRouter class:The router instance provides access to all core services: state management, transitions, URL handling, and more.
Register your states
Define the states that make up your application:States can be hierarchical, with parent-child relationships and nested views.
Core features
Powerful routing capabilities for modern single-page applications
State machine routing
Organize your app as a hierarchical tree of states with enter/exit hooks and transaction-like transitions
Flexible URLs
Support for path, query, and non-URL parameters with built-in and custom types, defaults, and optional values
Transition hooks
First-class async support with lifecycle hooks for authentication, authorization, logging, and more
Nested views
Multiple named views and view nesting for complex UI layouts and component composition
Lazy loading
Load state configurations and dependencies on-demand to reduce initial bundle size
Framework agnostic
Core library works with any framework — official integrations for Angular and React available
Explore the documentation
Deep dive into concepts, guides, and API references
Resources and community
Connect with the UI-Router community and explore framework-specific implementations
GitHub Repository
View source code, report issues, and contribute to the project
UI-Router for Angular
Full-featured router for Angular 1.x applications
UI-Router for React
State-based routing for React applications
Ready to get started?
Build powerful, state-driven single-page applications with UI-Router Core
Start Building