Attributes
Every attribute of the Core AR element, its type, its default and the modes it applies to.
Each row is one attribute of <vizbl-core>. Its name is the same however you install it: write it in HTML, set it with setAttribute, or pass it as a JSX attribute in React 19. An attribute marked Required must be set; one with modes in Applies to has no effect in other modes.
| Attribute | Type | Default | Applies to | Description |
|---|---|---|---|---|
type | 'advanced-ar' | 'ar-one-click' | 'ar-viewer' | Required | All | The mode: what a tap on the button opens. |
object-id | string | Required | All | The model's object ID, from Copy Object ID in the Model library (tinuuid in the Developer API). |
api-key | string | Required | All | Your publishable key. Not key, which React keeps for itself. |
variant-id | string | The first variant | All | The material variant the model opens in, by its id. |
size-type | 'cm' | 'inch' | inch | ar-viewer | The unit of the dimensions the 3D viewer shows. |
dimension-axes | string | x,y,z | ar-viewer | The dimensions the 3D viewer draws: x, y and z, separated by commas. |
camera-orbit | string | 0deg 75deg 105% | ar-viewer | The camera's starting position in the 3D viewer: theta phi radius, such as 30deg 75deg 105%. |
min-camera-orbit | string | No limit | ar-viewer | The lowest theta phi radius the shopper can turn or zoom to. Equal to the maximum on an axis, it locks that axis. |
max-camera-orbit | string | No limit | ar-viewer | The highest theta phi radius the shopper can turn or zoom to. |
trigger-class | string | - | All | Classes for the button the element draws. |
unstyled | boolean | false | All | Drops the button's default look, so only your classes style it. |
product-ref | string | - | All | Your store's own id for the product, so the dashboard counts openings per product. Vizbl.js sets it for you. |
Boolean attributes, such as unstyled, are on when present: unstyled, not unstyled="false". Every other value is text.
Events and error codes
The element dispatches core-ar-ready and core-ar-error. Events has their detail and every error code.
What JavaScript and React add
- JavaScript:
registerCoreArWidgets(), the element's properties and the package's exports. - React: the TypeScript declaration that lets React code type
<vizbl-core>.