1. Install the plugin
Kolibri Design System (KDS) is a Vue plugin. Register it in your application alongside scripts that are needed for its full functioning:
import KThemePlugin from 'kolibri-design-system/lib/KThemePlugin';
import trackInputModality from 'kolibri-design-system/lib/styles/trackInputModality';
import trackMediaType from 'kolibri-design-system/lib/styles/trackMediaType';
Vue.use(KThemePlugin);
trackInputModality();
trackMediaType();
- Installs
$themeBrand
,$themeTokens
$themePalette
, and$computedClass
helpers on all Vue instances (see Colors ). - Provides
$coreOutline
,$inputModality
,$mediaType
, and$isPrint
computed properties as well as$print
method to all Vue instances. - Globally registers all KDS Vue components.
- Inserts assertive and polite ARIA live regions
#k-live-region
to an application's document body (see useKLiveRegion ). - Inserts the overlay container element
#k-overlay
to an application's document body (seeKOverlay
or search forappendToOverlay
prop on components).
2. Initialize theme
Until this section is better documented, refer to Kolibri's initializeTheme.js.