Skip to main content
Use the <stackone-hub> custom element from @stackone/hub in any Vue 3 template.
1

Install the package

2

Tell Vue that stackone-hub is a custom element

Vue’s template compiler treats unknown tags as Vue components by default. Mark stackone-hub as a custom element so it falls through to the DOM:
3

Register the element at app entry

The import is side-effecting — it registers <stackone-hub> on customElements.
4

Get a session token from your backend

5

Add the element and listen for events

Attribute reference

Vue passes :prop="value" bindings through as HTML attributes when the tag is registered as a custom element. All scalar StackOneHub props map to kebab-case attributes — see the vanilla guide for the full table.

Events

Native DOM CustomEvents on the element: Vue’s @event shorthand does not fire on native DOM CustomEvents — Vue’s template handlers assume Vue-emitted events. Subscribe with addEventListener via a ref instead.

Next steps

Backend setup

Generate session tokens from your backend.

Filter connectors

Restrict the Hub to a single provider or category.