Skip to content

Using Directives ​

Directives in Vue.js are special HTML attributes that allow you to manipulate the DOM. Read more about custom directives at the Vue Docs.

Usage ​

To use a custom directive from the design system, you must import it and tell your application to use it.

main.ts

import { createApp } from 'vue';
import { CiPxClassDirective, CiTooltipDirective } from '@ci/stratus-components'

const app = createApp(App)
app.directive('px-class', CiPxClassDirective);
app.directive('tooltip', CiTooltipDirective);