Appearance
Tabs
The tabs component is an interactive UI element that allows users to switch between multiple pieces of content within the same space. Each tab acts as a trigger that reveals its associated content while hiding the others, helping organize information in a clear and structured way.
Examples
Basic Tabs
The first example demonstrates a simple usage of the tabs component. Each tab is linked to a separate content entity containing an image. The component uses default dimensions, styling, and built-in navigation, making it ideal for quick setups or simple image galleries in AR scenes.
Custom Content
The second example showcases how the tabs component can be used with fully custom 3D content instead of images. Each tab displays a different 3D primitive (sphere, box, cylinder), demonstrating flexibility in content rendering.
Props
| Property | Type | Default | Description |
|---|---|---|---|
| visible | boolean | true | Determines whether the tabs component is visible in the scene. |
| position | number[] | 0 0 0 | Defines the 3D position of the tabs in the format [x, y, z]. |
| opacity | number | 1 | Defines the transparency of the entire tabs component (0 = fully transparent, 1 = fully visible). |
| size | enum (small, medium, large, extra-large) | medium | Adjusts the overall size of the tabs component. |
| color | string (blue, #fff) | #ECECEC | Sets the default background or inactive tab color. |
| activecolor | string | #00BA92 | Defines the color of the currently active tab, helping users identify the selected state. |
| mode | string (light, dark) | "" | Controls the visual theme of the component, supporting either a light or dark mode. |
| tabitems | array ([{ "label": "Label", "content": "#content" }]) | [] | Defines the tabs. Each item includes a label (tab title) and content (selector referencing the content entity to display). |
