Scene
Scene component - the root node of a SceneGraph application
import { Scene } from "@roku-sdk/components";Scene(props: ISceneProps): JSX.ElementDescription
Scene component - the root node of a SceneGraph application.
Parameters
| Name | Type | Description |
|---|---|---|
props | ISceneProps |
Types
ISceneProps
Properties for the Scene node.
Scene is the root node of a SceneGraph application. Every roSGScreen object must have exactly one Scene node as its root. The Scene node provides background rendering, dialog management, and design resolution information.
| Name | Type | Description |
|---|---|---|
backExitsScene? | boolean | If true, a Back key press causes the scene to exit. If false, Back key doesn't exit the scene. Requires focus to be set on the scene or a child node. |
backgroundColor? | string | Specifies a background color for the scene as a hex string (e.g., "0x000000FF"). Only used if backgroundURI is set to an empty string. |
backgroundURI? | Uri | Specifies a graphic image file to be used for the Scene node background. |
dialog? | Element | Setting this field to a node extended from Dialog causes the dialog to be displayed. Set to invalid to dismiss the dialog. |
limitBackgroundToUIResolution? | boolean | If true, the backgroundURI image is limited to the current screen size after being loaded. If false, no scaling is applied. |
onCurrentDesignResolution? | EventHandler<DesignResolution> | Event fired when the current design resolution changes. Returns the width, height, and resolution mode ("HD", "FHD", or "SD"). |
palette? | Element | Defines the default color palette used by nodes that have a palette field, such as standard dialogs and keyboards. |
Extends IGroupProps.
DesignResolution
Represents the current design resolution of the scene.
| Name | Type | Description |
|---|---|---|
height | number | The height of the design resolution in pixels. |
resolution | "HD" | "FHD" | "SD" | The resolution mode. |
width | number | The width of the design resolution in pixels. |
Updated about 4 hours ago
What’s Next
Did this page help you?