Skip to content

Components ​

The dist/senangstart-xr.js bundle defines the following components and their matching HTML primitives.

ComponentPrimitiveDescription
sxr-flex-containera-sxr-flex-containerLayout container with flexbox-inspired layout
sxr-item<none>Used by other components for common properties like height and width
sxr-interactable<none>Used by other components to define onclick behavior
sxr-cursora-sxr-cursorCursor used to interact with GUI elements.
sxr-buttona-sxr-buttonStandard button component with text label
sxr-icon-buttona-sxr-icon-buttonButton with icon label instead of text
sxr-icon-label-buttona-sxr-icon-label-buttonButton with both icon and text labels
sxr-radioa-sxr-radioRadio button
sxr-togglea-sxr-toggleToggle button
sxr-slidera-sxr-sliderSlider component
sxr-vertical-slidera-sxr-vertical-sliderVertical slider component
sxr-inputa-sxr-inputText input field
sxr-labela-sxr-labelText label
sxr-progress-bara-sxr-progressbarProgress bar
sxr-circle-loadera-sxr-circle-loaderCircular progress meter
sxr-circle-timera-sxr-circle-timerCircular progress meter with timer

Two further components back the widgets but are useful on their own: sxr-item (shared dimensions) and rounded (rounded panel geometry).

Component reference ​

Basics ​

Buttons & toggles ​

Values & progress ​

Building blocks ​

Common properties ​

Most widgets share a set of properties contributed by sxr-item (size, depth, margin, bevel) and sxr-interactable (callbacks, keyboard shortcuts). Pages that support them list them individually; see Item & Interactable for the full schema.

Primitive naming ​

Every primitive maps kebab-case HTML attributes onto component properties:

html
<a-sxr-icon-label-button icon-active="play" font-size="0.16"></a-sxr-icon-label-button>
<!-- maps to sxr-icon-label-button.iconActive and .fontSize -->

Because they are ordinary A-Frame primitives, attributes can also be set programmatically with setAttribute — see Live Attribute Updates.