StandardDialogNext

Portable dialog chrome composed from core-contract primitives on ModalBoundary

import { StandardDialogNext } from "@roku-sdk/components/standard-dialog-next";
StandardDialogNext(props: IStandardDialogNextProps): JSX.Element

Description

Portable dialog chrome composed from core-contract primitives on ModalBoundary. Use instead of StandardDialog when the app must stay within the portable core-contract elements.

Parameters

NameTypeDescription
propsIStandardDialogNextProps

Types

IStandardDialogNextProps

Portable dialog built from core-contract primitives on ModalBoundary. Prefer this over StandardDialog when using the portable core contract.

The intended successor to StandardDialog, hence the name: it is the same kind of component -- a themed dialog with a title, a body and a row of buttons -- but composed from the frozen primitive subset instead of the native SceneGraph dialog node, so it renders on every target rather than on device only. The two ship side by side while apps migrate; Next collapses into the base name once the SceneGraph implementation is retired.

The props are deliberately close to IStandardDialogProps but not identical -- see IStandardDialogNextPaletteColors for the palette fields that have no counterpart in primitive-composed chrome.

NameTypeDescription
buttons?IStandardDialogNextButton[]
children?ElementCustom body, replacing text. See below.
contentHeight?numberHeight reserved for children, in FHD units. Ignored when children is absent.
focusId?objectStable focus identity shared with useModal().focusId when opening via open(). Required when the dialog participates in virtual-focus modality.
initialButtonIndex?numberWhich button receives initial focus.
onButtonSelected?(index: number) => void
onClosed?() => voidFires at most once per open cycle (button, Back, or programmatic close).
onDismiss?() => voidBack / dismissKeys path before onClosed.
palette?IStandardDialogNextPaletteColors
showbooleanWhether the dialog is visible. Wire to useModal().isOpen() or app state.
text?stringPlain-text body when children is not provided. Ignored when children is.
title?string
width?numberPanel width in FHD space.

IStandardDialogNextProps.children

Custom body, replacing text. Rendered in the panel's content region, so its own coordinates start at the left margin below the title rule rather than at the panel corner.

Nothing here can measure a subtree, so pass contentHeight as well — without it the content region is zero-height and the buttons are laid out over the top of the children.

IStandardDialogNextButton

NameTypeDescription
textstring

IStandardDialogNextPaletteColors

Colour bag matching the native StandardDialog palette fields that StandardDialogNext chrome draws.

Only the fields this component actually reads are here. StandardDialog's dialogItemColor and dialogFootprintColor have no counterpart in the chrome composed from core-contract primitives, and declaring them would invite a caller to set a colour that silently does nothing.

NameTypeDescription
dialogBackgroundColor?stringPanel fill.
dialogFocusColor?stringFill of the focused button.
dialogFocusItemColor?stringLabel on the focused button.
dialogSecondaryItemColor?stringFill of an unfocused button, and the rule under the title.
dialogSecondaryTextColor?stringBody text.
dialogTextColor?stringTitle text, and the label on an unfocused button.

Did this page help you?