Skip to content

UI List Item

Updated

One row of a UI List.

Type
comp-ui-list-item
Script class
UIListItemComponent
Per entity
One
Version
1.1.0

Read about it in Controls: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
badge 0 ≤ x ≤ 1000000
borderRadius
borderRadius[] 0 ≤ x ≤ 16384
fontSize 0 ≤ x ≤ 4096
margin
margin[] -16384 ≤ x ≤ 16384
padding
padding[] 0 ≤ x ≤ 16384
size 0 ≤ x ≤ 4096

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • UIListItem::select

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(UIListItemComponent);
if (component) log(component.props);
}