@beeq/vue, the official Vue wrapper around BEEQ web components.
Vue already handles custom elements well, and the BEEQ wrapper makes the developer experience even smoother by adding typed component imports and v-model support for compatible form controls.
Vue-friendly imports
Import BEEQ components as PascalCase Vue components instead of relying only on raw custom elements.
Custom elements support
Tell Vue to treat all
bq- tags as custom elements so your templates stay clean and warning-free.`v-model` support
Use compatible BEEQ form controls with
v-model for a more natural Vue authoring experience.Vue has strong built-in support for custom elements — you can use raw
bq-* elements in templates without any wrapper. @beeq/vue adds PascalCase component imports, TypeScript types, and native v-model support for compatible form controls.Get started
You can add BEEQ to an existing Vue project in a few steps:Check your project setup
Make sure your project already has:
- Vue
3 - Node.js
18+ - a Vue application created with Vite or another modern build setup
Install the packages
Install both the core package and the Vue wrapper:What each package gives you:
@beeq/coreincludes the web components, styles, icons, and shared types@beeq/vueprovides Vue-friendly component wrappers
Tell Vue to treat BEEQ as custom elements
Vue should compile If you are using Vue without a build step, configure the compiler directly:
bq- tags as custom elements instead of trying to resolve them as local Vue components.Configure @vitejs/plugin-vue:vite.config.ts
Add the global styles
Import the BEEQ stylesheet once in your application’s main stylesheet:
src/style.css
Configure icons
Many BEEQ components rely on SVG icons. Your application needs to serve the SVG files and tell BEEQ where to find them.The fastest way to tell BEEQ where to find the icons is to add a If you are using Vite, install the static copy plugin:Then copy the SVG files and set the base path during app startup:
<script> tag with the data-beeq attribute in your index.html entry point:src/index.html
Vue usage patterns with BEEQ
Import components from @beeq/vue
Use the Vue wrapper when you want a more natural Vue authoring experience:
Use Vue event bindings with @bq...
BEEQ custom events work with standard Vue event binding syntax:
Use v-model on supported form controls
The Vue wrapper supports v-model on compatible BEEQ controls. For input components, also handle the @bqClear event to keep your reactive ref in sync when the user clicks the clear button:
v-model:
| Component | Bound prop |
|---|---|
BqCheckbox, BqSwitch | checked |
BqDatePicker, BqInput, BqRadioGroup, BqSelect, BqSlider, BqTextarea | value |
bqChange as the trigger event.
Slots still use the slot attribute
Slotted content works the same way as in the web component API:
Complete example
This example combines component imports,v-model, icons, and event bindings in a Vue app.
Server-side rendering (Nuxt and SSR frameworks)
If you are using Nuxt or another Vue SSR framework, wrapsetBasePath() in a client-only plugin to ensure it only runs in the browser:
plugins/beeq.client.ts
.client.ts suffix tells Nuxt to load this plugin only on the client side. If you are using a different SSR framework, wrap the call inside onMounted() instead.
VS Code autocomplete
BEEQ ships HTML custom data for Visual Studio Code, which improves completion and inline hints for the underlying custom elements. Create.vscode/settings.json in your project root and add:
Troubleshooting
Vue is warning about unknown elements
Vue is warning about unknown elements
Make sure your Vue compiler config includes
isCustomElement: (tag) => tag.includes("bq-").Icons are not rendering
Icons are not rendering
Check both of these:
- the SVG files are being served by your app
setBasePath()points to the same public URL where those files are available
`v-model` is not updating
`v-model` is not updating
Confirm that you are using the Vue wrapper from
@beeq/vue and that the component supports v-model (see the table in the v-model usage pattern section above). Also make sure you have added @bqClear to handle the clear button.Styles are missing
Styles are missing
Make sure
@beeq/core/dist/beeq/beeq.css is imported once in the stylesheet your Vue app actually loads.Can I use raw bq-* elements without the Vue wrapper?
Can I use raw bq-* elements without the Vue wrapper?
Yes. Once you have
isCustomElement: (tag) => tag.includes("bq-") set in your Vite or compiler config, you can use <bq-button @bqClick="save"> directly in templates. The Vue wrapper gives you cleaner PascalCase imports and native v-model support, but raw custom elements work too.Next steps
Explore components
Start with a component page to see props, events, slots, and framework examples.
Customize the theme
Review theming options if your product needs brand customization.
Open Storybook
Explore component states and interactions in the live component library.