@beeq/react, the official React wrapper around BEEQ web components.
It gives you React-friendly components such as BqButton, BqInput, and BqCard, so you can work with props, events, and slots in a way that feels much closer to a native React library.
If you are starting a new React project, we recommend using a modern setup such as Vite. If you are working in a server-rendered React framework like Next.js, use the dedicated framework guide instead, since client-side setup and asset handling may differ.
Real props
Pass component properties in a React-friendly way, including richer values such as arrays and objects.
Custom events
Listen to BEEQ events through
onBq... handlers instead of wiring DOM listeners by hand.Native-feeling DX
Work with PascalCase components such as
BqButton, BqInput, and BqCard.In the standard React integration flow, you do not need to manually import the BEEQ ESM bundle or call
defineCustomElements() yourself.Get started
You can add BEEQ to an existing React project in a few steps:Check your project setup
Make sure your project already has:
reactandreact-domversion18or19- Node.js
18+ - a React application setup such as Vite
Install the packages
Install both the core package and the React wrapper:What each package gives you:
@beeq/coreincludes the web components, styles, icons, and shared types@beeq/reactprovides the React wrappers used in your application code
Add the global styles
Import the BEEQ stylesheet once in your application’s main CSS or SCSS file, then make sure that stylesheet is loaded from your app entry point.
Configure icons
Many BEEQ components rely on SVG icons. Your application needs to serve the SVG files and tell BEEQ where to find them.
- Vite
- CDN or existing icon source
- Set base path via HTML
- Copy only the icons you need
If you are using Vite, install the static copy plugin:Then copy the BEEQ SVG files from
node_modules into your build output and set the base path during app startup.React usage patterns with BEEQ
Import components in PascalCase
Import BEEQ components from@beeq/react and use them as PascalCase React components:
Use React prop names
Always use the JavaScript prop name in React instead of the HTML attribute name. Examples:- only-icon → onlyIcon
- debounce-time → debounceTime
- justify-content → justifyContent
Use on... handlers for BEEQ events
BEEQ custom events become React-style event props by adding the on prefix:
• bqClick → onBqClick
• bqInput → onBqInput
• bqChange → onBqChange
• bqFocus → onBqFocus
Slots still use the slot prop
To place content into BEEQ slots in React, pass slot to the child element:Calling component methods with a ref
Some BEEQ components expose methods you can call programmatically.BqDialog and BqDrawer, for example, have open() and close() methods. Use useRef with the underlying HTML element type to access them:
Complete example
This example puts a few common pieces together: styles, input handling, icons, and button events.Typescript notes
BEEQ also exports useful types from@beeq/core, including custom event types:
- you want stronger typing in extracted handlers
- you are working with more complex event payloads
- you want clearer autocomplete in larger components
Troubleshooting
Styles are missing
Styles are missing
Make sure
@beeq/core/dist/beeq/beeq.css is imported once in your app’s main stylesheet, and that the stylesheet is actually loaded by your entry file.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
Event handlers are not firing
Event handlers are not firing
Use wrapper components from
@beeq/react and the onBq... props. If you render raw custom elements directly in React, event handling becomes less predictable.Props are not working as expected
Props are not working as expected
Make sure you are using the React prop names (camelCase) instead of the HTML attributeUse the React prop name, not the HTML attribute name. For example, use
onlyIcon instead of only-icon, debounceTime instead of debounce-time, and justifyContent instead of justify-content.I'm using a server-rendered React framework
I'm using a server-rendered React framework
Use the dedicated framework guide. Those setups often need client-only initialization or different handling for assets and hydration.
Next steps
Explore components
Start with a real 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.