Skip to Content

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.

AttributeTypeDefaultApplies toDescription
type'advanced-ar' | 'ar-one-click' | 'ar-viewer'RequiredAllThe mode: what a tap on the button opens.
object-idstringRequiredAllThe model's object ID, from Copy Object ID in the Model library (tinuuid in the Developer API).
api-keystringRequiredAllYour publishable key. Not key, which React keeps for itself.
variant-idstringThe first variantAllThe material variant the model opens in, by its id.
size-type'cm' | 'inch'inchar-viewerThe unit of the dimensions the 3D viewer shows.
dimension-axesstringx,y,zar-viewerThe dimensions the 3D viewer draws: x, y and z, separated by commas.
camera-orbitstring0deg 75deg 105%ar-viewerThe camera's starting position in the 3D viewer: theta phi radius, such as 30deg 75deg 105%.
min-camera-orbitstringNo limitar-viewerThe lowest theta phi radius the shopper can turn or zoom to. Equal to the maximum on an axis, it locks that axis.
max-camera-orbitstringNo limitar-viewerThe highest theta phi radius the shopper can turn or zoom to.
trigger-classstring-AllClasses for the button the element draws.
unstyledbooleanfalseAllDrops the button's default look, so only your classes style it.
product-refstring-AllYour 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>.

On this page