<bq-button>, <bq-input>, and so on). Use this guide when you are not using @beeq/angular, @beeq/react, or @beeq/vue — for example static HTML, legacy apps, micro-frontends, or vanilla JS/TS with Vite.
No wrapper required
Work with native custom elements and DOM APIs — no framework-specific package.
CDN-friendly
Add a stylesheet and module script to any HTML page; no Node.js or bundler required.
Bundler-ready
Install
@beeq/core with npm and use defineCustomElements() in TypeScript or JavaScript apps.If you use Angular, React, Vue, or Next.js, prefer the matching framework guide for wrappers, forms, and stack-specific setup.
Get started
Check your project setup
Choose the path that matches how you build your app:
- CDN — plain
.htmlfiles, prototypes, or pages without a build step - Bundler — Vite, Webpack, or similar (Node.js 18+)
Add styles and register components
Follow the path you chose in Step 1 — CDN or Bundler. You only need one.Import global styles once, register custom elements at startup, and load your entry script from HTML:
CDN
Link the BEEQ stylesheet and ESM bundle from a CDN. Components register automatically when the module loads.index.html
Bundler
Install@beeq/core with your package manager, then call defineCustomElements() at app startup:The Vite example above applies to other bundlers too: copy SVGs into a public folder your app serves, then call
setBasePath() with that URL (see Configure icons below).Configure icons
Many BEEQ components rely on SVG icons. Your app must serve the SVG files and tell BEEQ where to find them.Setup via
This is the quickest way to set up BEEQ SVG icons for CDN pages and many bundler apps.Add the Setup via
With a bundler, you can include the SVG files in your build output and use
Setup via data-beeq attribute
This is the quickest way to set up BEEQ SVG icons for CDN pages and many bundler apps.Add the data-beeq attribute to the <script type="module"> tag pointing at the directory or a CDN URL that contains the SVG files. BEEQ reads this automatically.index.html
Setup via setBasePath()
With a bundler, you can include the SVG files in your build output and use setBasePath() to configure the base path for the SVG files.If you are using Vite, you can use the vite-plugin-static-copy plugin.Install the static copy plugin, copy SVGs into your build output, and call setBasePath() before rendering components that use icons:When you use
setBasePath(), you do not need a data-beeq attribute on the same page unless you want a fallback.Listen to events
BEEQ components emit custom events prefixed withbq — for example bqClick, bqChange, bqBlur, bqSelect. Always prefer these over standard DOM events (click, change) when they exist: the bq variants carry structured detail payloads and reflect the component’s actual internal state, not just a raw DOM event.
Every component’s API reference table lists which events it emits and what event.detail contains. Check the component page in the Components section before wiring a listener.
TypeScript support
Import event detail types and element interfaces from@beeq/core for full type safety:
@beeq/core (for example HTMLBqButtonElement) where your editor supports them.
Properties, attributes, and slots
| Approach | When to use |
|---|---|
| HTML attributes | Strings and simple static values (appearance="primary") |
| Element properties | Booleans, numbers, objects, and dynamic values (button.disabled = true) |
| Slots | Project content into named areas (slot="prefix", default slot for label text) |
true unless the component documents otherwise. When in doubt, set the property in JavaScript:
VS Code autocomplete
BEEQ ships HTML custom data for Visual Studio Code, which improves completion forbq-* tags and attributes.
Create .vscode/settings.json in your project root:
Troubleshooting
Components render as plain tags (no styles or behavior)
Components render as plain tags (no styles or behavior)
Icons are not rendering
Icons are not rendering
Check both of these:
- SVG files are available at a public URL (CDN or copied into your app)
data-beeqpoints to that directory orsetBasePath()uses the same public path your app serves- Icon
namevalues match SVG file names (without.svg)
Event listeners never fire
Event listeners never fire
Make sure you listen for the
bq-prefixed event name (for example bqClick, not click) and attach the listener after the element exists in the DOM.Property updates do not reflect in the UI
Property updates do not reflect in the UI
Set properties on the element instance (
element.value = "...") rather than only changing attributes when the component expects a property binding.Styles are missing in a bundler app
Styles are missing in a bundler app
Import
@beeq/core/dist/beeq/beeq.css once in a stylesheet your entry file loads. See Installation for the shared import pattern.Next steps
Explore components
Browse component pages for props, events, slots, and 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.
Using a framework instead?
If your project uses a major frontend framework, the official wrappers improve forms, events, and developer experience:Angular
Standalone components, forms, and value accessors.
React
PascalCase components and
onBq... event props.Next.js
SSR, layout setup, and client-only icon initialization.
Vue
Custom element compiler options and
v-model support.