Skip to content

List

The list component is used to display a vertical collection of structured text items in 3D space.

It organizes information into clearly separated entries, each containing a title and optional supporting text, making it easier to scan and read content in spatial interfaces.

Examples

Basic List

This example demonstrates the simplest usage of the list component. It renders a vertical list of text items using the default layout (type="text"), with only textcolor and items customized.


Custom Styling and Sizing

This example shows how to customize the visual appearance of the list using the card type, along with color, width, and size adjustments.

Multi-line and Width Behavior

This example demonstrates how the list handles long subtitles and varying widths. The left list uses a wider layout, allowing text to occupy fewer lines. The right list is narrower, forcing content to wrap across multiple lines


Props

PropertyTypeDefaultDescription
visiblebooleantrueDetermines whether the list is visible in the scene.
positionnumber[]0 0 0Defines the 3D position of the list in the format [x, y, z].
sizeenum (small, medium, large)mediumControls overall scaling, including text size, spacing, and item proportions.
widthnumber1Sets the width of the list in meters. Affects text wrapping and layout density.
opacitynumber1Specifies the opacity of the component.
textcolorstring"black"Sets the color of the text content (titles and subtitles).
colorstring"#ECECEC"Defines the background color used in the card layout. The highlight color of a selected item is automatically derived from this value.
itemsarray[]Array of objects representing list items.
typeenum (text, card)textDetermines the visual style of the list. text is minimal, card adds background containers.

Events

The list component emits the following events when interacted with:

EventParametersDescription
selected{ item: object, index: number }Emitted when a list item is selected. Returns the selected item data and its index in the array.