UI/UX Components
Modules
cap-uix-switch ⇐ ui-switch
A toggle switch that allows the user to choose between two states, typically on or off. This primitive uses the ui-switch
component.
cap-uix-layout ⇐ layout
A layout container that arranges its children in a specific layout, such as a box, circle, or grid. This primitive uses the layout
component with default type box
.
cap-uix-slider ⇐ ui-slider
A slider that allows the user to select a value from a range. This primitive uses the ui-slider
component.
cap-uix-icon ⇐ troika-text
An icon that can be used to represent various actions or objects. This primitive uses the troika-text
component with default settings for a close icon.
cap-uix-card ⇐ uix-card
A rectangular container with rounded corners, typically used to display content in a visually appealing way. This primitive uses the uix-card
component.
cap-uix-text ⇐ troika-text
Displays text in 3D space. This primitive uses the troika-text
component.
cap-uix-button ⇐ ui-btn
A clickable button that can be used to trigger actions or navigate to different parts of an experience. This primitive uses the ui-btn
component and is styled with the rounded
component.
cap-line ⇐ line2
Draws a line in 3D space. This primitive uses the line2
component.
cap-box-rounded ⇐ uix-box-rounded
A box with rounded corners. This primitive uses the uix-box-rounded
component.
cap-trigger ⇐ geometry
A trigger component that can be used to detect interactions in a 3D space. This primitive uses the geometry
, body
, and trigger
components.
cap-uix-switch ⇐ ui-switch
ui-switch
A toggle switch that allows the user to choose between two states, typically on or off. This primitive uses the ui-switch
component.
Extends: ui-switch
Properties
Name | Type | Description |
---|---|---|
value |
| Value of the switch. |
disabled |
| Whether the switch is disabled. |
Example
cap-uix-layout ⇐ layout
layout
A layout container that arranges its children in a specific layout, such as a box, circle, or grid. This primitive uses the layout
component with default type box
.
Extends: layout
Properties
Name | Type | Description |
---|---|---|
type |
| Type of layout. (default: box) |
radius |
| Radius of the layout. |
angle |
| Angle of the layout. |
columns |
| Number of columns in the layout. |
margin-column |
| Margin between columns. |
margin-row |
| Margin between rows. |
order-attribute |
| Attribute to order elements. |
plane |
| Whether the layout is planar. |
reverse |
| Whether to reverse the layout. |
fill |
| Whether to fill the layout. |
align |
| Alignment of the layout. |
Example
cap-uix-slider ⇐ ui-slider
ui-slider
A slider that allows the user to select a value from a range. This primitive uses the ui-slider
component.
Extends: ui-slider
Properties
Name | Type | Description |
---|---|---|
value |
| Value of the slider. |
disabled |
| Whether the slider is disabled. |
width |
| Width of the slider. |
height |
| Height of the slider. |
rail-radius |
| Radius of the slider rail. |
handle-radius |
| Radius of the slider handle. |
Example
cap-uix-icon ⇐ troika-text
troika-text
An icon that can be used to represent various actions or objects. This primitive uses the troika-text
component with default settings for a close icon.
Extends: troika-text
Properties
Name | Type | Description |
---|---|---|
icon |
| Icon value. (You can use all material-symbols-rounded Icon name from Google Font Icons) |
color |
| Color of the icon. |
size |
| Size of the icon. |
Example
cap-uix-card ⇐ uix-card
uix-card
A rectangular container with rounded corners, typically used to display content in a visually appealing way. This primitive uses the uix-card
component.
Extends: uix-card
Properties
Name | Type | Description |
---|---|---|
height |
| Height of the card. |
width |
| Width of the card. |
color |
| Color of the card. |
radius |
| Radius of the card corners. |
opacity |
| Opacity of the card. |
border-color |
| Color of the card border. |
render-order |
| Render order of the card. |
border-width |
| Width of the card border. |
border-opacity |
| Opacity of the card border. |
Example
cap-uix-text ⇐ troika-text
troika-text
Displays text in 3D space. This primitive uses the troika-text
component.
Extends: troika-text
Properties
Name | Type | Description |
---|---|---|
align |
| Alignment of the text. |
anchor |
| Anchor point of the text. |
baseline |
| Baseline alignment of the text. |
clip-rect |
| Clip rectangle of the text. |
color |
| Color of the text. |
depth-offset |
| Depth offset of the text. |
font |
| Font of the text. |
font-size |
| Font size of the text. |
letter-spacing |
| Letter spacing of the text. |
line-height |
| Line height of the text. |
max-width |
| Maximum width of the text. |
outline-color |
| Outline color of the text. |
outline-width |
| Outline width of the text. |
overflow-wrap |
| Overflow wrap of the text. |
render-order |
| Render order of the text. |
side |
| Side of the text. |
tone-mapped |
| Whether the text is tone-mapped. |
value |
| Value of the text. |
white-space |
| White space handling of the text. |
y-offset |
| Y offset of the text. |
z-offset |
| Z offset of the text. |
Example
cap-uix-button ⇐ ui-btn
ui-btn
A clickable button that can be used to trigger actions or navigate to different parts of an experience. This primitive uses the ui-btn
component and is styled with the rounded
component.
Extends: ui-btn
Mixes: rounded
Properties
Name | Type | Description |
---|---|---|
height |
| Height of the button. |
width |
| Width of the button. |
color |
| Color of the button. |
radius |
| Radius of the button corners. |
disabled |
| Whether the button is disabled. |
tooltip-text |
| Tooltip Text. |
Example
cap-line ⇐ line2
line2
Draws a line in 3D space. This primitive uses the line2
component.
Extends: line2
Properties
Name | Type | Description |
---|---|---|
color |
| Color of the line. |
width |
| Width of the line. |
start |
| Starting point of the line. |
end |
| Ending point of the line. |
Example
cap-box-rounded ⇐ uix-box-rounded
uix-box-rounded
A box with rounded corners. This primitive uses the uix-box-rounded
component.
Extends: uix-box-rounded
Properties
Name | Type | Description |
---|---|---|
depth |
| Depth of the box. |
height |
| Height of the box. |
width |
| Width of the box. |
color |
| Color of the box. |
transparent |
| Whether the box is transparent. |
opacity |
| Opacity of the box. |
radius |
| Radius of the box Border. |
Example
cap-trigger ⇐ geometry
geometry
A trigger component that can be used to detect interactions in a 3D space. This primitive uses the geometry
, body
, and trigger
components.
Extends: geometry
, body
, trigger
Emits: collide - Event triggered when a collision occurs,event: regardless of local-trigger setting.
, beginCollide - Event triggered when a collision begins.event: Respects local-trigger setting.
, endCollide - Event triggered when a collision ends.event: Respects local-trigger setting.
Properties
Name | Type | Description |
---|---|---|
geometry |
| Geometry component settings. |
geometry.primitive |
| The type of geometry primitive. |
body |
| Physics body component settings. |
body.type |
| The type of physics body. |
body.isTrigger |
| Whether the body is a trigger. |
local-trigger |
| Only interactions from local Objects. |
visible |
| For Debug show the Collider Geometry Mesh. |
Example
Last updated