createPinnedFocusXExtension
Pin the focused item's left edge to a fixed screen X (hero banner carousel)
import {
createPinnedFocusXExtension,
} from "@roku-sdk/flex-grid/compose-h-strategy";createPinnedFocusXExtension<TConfig extends FocusStrategyBase>(matches: HStrategyMatcher, focusX: number): HStrategyExtension<TConfig>Description
Pin the focused item's left edge to a fixed screen X (hero banner carousel). Ignores base scroll/focus values when matched.
Parameters
| Name | Type | Description |
|---|---|---|
matches | HStrategyMatcher | Selects focus states where this extension applies. |
focusX | number | Fixed focus position in pixels. |
Return values
An extension replacing the horizontal focus and scroll positions.
Example
import { createPinnedFocusXExtension, matchRow } from "@roku-sdk/flex-grid/compose-h-strategy";
createPinnedFocusXExtension(matchRow(0), 100);Updated about 5 hours ago
What’s Next
Did this page help you?