Options
Definition of all available options for barba.init
.
For a deep dive into the Barba Core
class, please see the developer API.
Summary
Syntax
Here is short syntax of all options with their defaults.
1 | barba.init({ |
Definition
Barba can take some arguments in the initialization step:
Name | Type | Description |
---|---|---|
cacheFirstPage |
boolean |
Disable cache on the first rendered page, see cacheFirstPage strategy |
cacheIgnore |
IgnoreOption |
Disable cache or ignore some routes, see cacheIgnore strategy |
debug |
boolean |
Enable debug mode |
logLevel |
keyof LogLevels |
Set custom log level for fine-grained debugging |
prefetchIgnore |
IgnoreOption |
Disable prefetch or ignore routes, see prefetchIgnore strategy |
prevent |
PreventCheck |
Set custom prevent check |
preventRunning |
boolean |
Prevent click when transition is running, see preventRunning strategy |
requestError |
RequestCustomError |
Set custom request error |
schema |
ISchemaAttribute |
Set custom schema to override data-barba attributes |
timeout |
number |
Request timeout |
transitions |
ITransitionPage[] |
Array of Transitions |
views |
IView[] |
Array of Views |
All arguments inherit from
IBarbaOptions
interface.