# Configuration
To configure library's default behavior just pass options as second argument to Vue.use()
:
import Vue from "vue"
import Atomio from "atomio-vue"
Vue.use(Atomio, {
theming: {
currentTheme: "primary"
}
})
The same works when installing just AtomioContext
.
# $atomio
AtomioContext
is available via $atomio
property on Vue root instance (and in all components).
For example, you can dynamically change global theme in some component:
<script>
export default {
//...
methods: {
//...
setDarkTheme() {
this.$atomio.theming.currentTheme = "primary-dark"
}
//...
}
//...
}
</script>
More on theming here.