Make your app usable with a TV remote: arrow keys, OK and Back.
A TV has no touch screen and no pointer. When your app runs on TV, UIProvider starts a spatial navigator: the arrow keys move real DOM focus to the nearest focusable element in that direction, OK clicks it, and Back walks a stack of handlers (close the open sheet, then the next overlay, then leave the app).Every kit component (Pressable, Button, Input, ListItem, TabBar…) is already focusable. You only need the tools below for your own clickable elements.
Detection
How the app is loaded
What happens
Inside the TV shell
The shell, or the SDK’s iframe relay, drives the remote. @cskn/ui detects this and stays passive, so the remote is never driven twice.
Directly in a TV browser (webOS, Tizen)
There is no bridge, but @cskn/ui recognizes the TV from the user agent and starts its own navigator.
Forced
<UIProvider env="tv">, ?cskn-tv=1 in the URL, or window.__csknForceTv = true. Useful for testing in a desktop browser.
Making your own elements focusable
import { useFocusable } from '@cskn/ui';function PosterTile({ onPlay, first }: Props) { const focusable = useFocusable({ autoFocus: first }); return <div {...focusable} role="button" onClick={onPlay}>▶</div>;}
boolean
Preferred first focus when its screen or overlay becomes active. Use at most one per scope.
boolean
Remove it from the navigation order.
number
Override the tab order.
The hook returns data-focus and tabIndex. Elements with data-focus get the theme’s focus ring (ring color).
Keep the arrow keys inside this subtree. Use it for overlays.
boolean
Focus the first focusable element on mount.
() => void
Called on Back or Escape while this scope is on top.
The kit’s overlays already use scopes. For custom flows: pushBackHandler(fn) adds a Back handler and returns its removal, focusFirst(root?) moves focus into a container, and startSpatialNav() / stopSpatialNav() control the navigator directly.
Everywhere else
data-focus and the focus ring also make your app keyboard-accessible on web and desktop. On touch devices the ring is not shown, so it is safe to apply everywhere.
For a full TV surface, the TV kit gives you the frame, shelves, cards and players, already sized to read from across the room.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"cskn Developers","colors":{"primary":"#0E7490","light":"#22D3EE","dark":"#0E7490"},"logo":{"light":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/light.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=c32921af2ea7b26ed147c2fc20b7ccee","dark":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/dark.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=744e66e27e1cf87a23616f001cc434fe"},"favicon":"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/favicon.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=3befee8751ab38dad2aa73683be379c7","navbar":{"primary":{"type":"button","label":"cskn.app","href":"https://cskn.app"}},"footer":{"socials":{"website":"https://cskn.app"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cskn","hasAudioNarration":false,"actualSubdomain":"cskn","customDomains":["docs.cskn.dev"],"gitSource":{"type":"github","owner":"cskndev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b1101889ffae5051c41e0df"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b11d0585cba04131759e65f","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"@cskn/sdk","count":36},{"language":"default","tag":"@cskn/ui","count":27},{"language":"default","tag":"Native features","count":20},{"language":"default","tag":"Platform API","count":10},{"language":"default","tag":"Get started","count":9},{"language":"default","tag":"Components","count":9},{"language":"default","tag":"Profile integration","count":7},{"language":"default","tag":"Overview","count":6},{"language":"default","tag":"Platform","count":5},{"language":"default","tag":"Stack navigation","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"ui/tv-navigation","slug":"/ui/tv-navigation","pageMetadata":{"title":"TV navigation","description":"Make your app usable with a TV remote: arrow keys, OK and Back.","href":"/ui/tv-navigation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Make your app usable with a TV remote: arrow keys, OK and Back.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A TV has no touch screen and no pointer. When your app runs on TV, `,_jsx(_components.code,{children:`UIProvider`}),` starts a spatial navigator: the arrow keys move real DOM focus to the nearest focusable element in that direction, OK clicks it, and Back walks a stack of handlers (close the open sheet, then the next overlay, then leave the app).`]}),`\n`,_jsxs(_components.p,{children:[`Every kit component (`,_jsx(_components.code,{children:`Pressable`}),`, `,_jsx(_components.code,{children:`Button`}),`, `,_jsx(_components.code,{children:`Input`}),`, `,_jsx(_components.code,{children:`ListItem`}),`, `,_jsx(_components.code,{children:`TabBar`}),`…) is already focusable. You only need the tools below for your own clickable elements.`]}),`\n`,_jsx(Heading,{level:`2`,id:`detection`,children:`Detection`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`How the app is loaded`}),_jsx(_components.th,{children:`What happens`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Inside the TV shell`}),_jsx(_components.td,{children:`The shell, or the SDK’s iframe relay, drives the remote. @cskn/ui detects this and stays passive, so the remote is never driven twice.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Directly in a TV browser (webOS, Tizen)`}),_jsx(_components.td,{children:`There is no bridge, but @cskn/ui recognizes the TV from the user agent and starts its own navigator.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Forced`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\u003cUIProvider env=\"tv\">`}),`, `,_jsx(_components.code,{children:`?cskn-tv=1`}),` in the URL, or `,_jsx(_components.code,{children:`window.__csknForceTv = true`}),`. Useful for testing in a desktop browser.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`making-your-own-elements-focusable`,children:`Making your own elements focusable`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useFocusable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@cskn/ui'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` PosterTile`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`onPlay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`first`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Props`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` focusable`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useFocusable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`autoFocus:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` first`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`focusable`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"button\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`onPlay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`▶`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`autoFocus`,type:`boolean`,id:`param-auto-focus`,children:`Preferred first focus when its screen or overlay becomes active. Use at most one per scope.`}),`\n`,_jsx(ParamField,{path:`disabled`,type:`boolean`,id:`param-disabled`,children:`Remove it from the navigation order.`}),`\n`,_jsx(ParamField,{path:`tabIndex`,type:`number`,id:`param-tab-index`,children:`Override the tab order.`}),`\n`,_jsxs(_components.p,{children:[`The hook returns `,_jsx(_components.code,{children:`data-focus`}),` and `,_jsx(_components.code,{children:`tabIndex`}),`. Elements with `,_jsx(_components.code,{children:`data-focus`}),` get the theme’s focus ring (`,_jsx(_components.code,{children:`ring`}),` color).`]}),`\n`,_jsx(Heading,{level:`2`,id:`scopes-and-back`,children:`Scopes and Back`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FocusScope`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@cskn/ui'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`FocusScope`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` trap`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` autoFocus`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onBack`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`close`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`PlayerControls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`FocusScope`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{path:`trap`,type:`boolean`,id:`param-trap`,children:`Keep the arrow keys inside this subtree. Use it for overlays.`}),`\n`,_jsx(ParamField,{path:`autoFocus`,type:`boolean`,id:`param-auto-focus-1`,children:`Focus the first focusable element on mount.`}),`\n`,_jsx(ParamField,{path:`onBack`,type:`() => void`,id:`param-on-back`,children:`Called on Back or Escape while this scope is on top.`}),`\n`,_jsxs(_components.p,{children:[`The kit’s overlays already use scopes. For custom flows: `,_jsx(_components.code,{children:`pushBackHandler(fn)`}),` adds a Back handler and returns its removal, `,_jsx(_components.code,{children:`focusFirst(root?)`}),` moves focus into a container, and `,_jsx(_components.code,{children:`startSpatialNav()`}),` / `,_jsx(_components.code,{children:`stopSpatialNav()`}),` control the navigator directly.`]}),`\n`,_jsx(Heading,{level:`2`,id:`everywhere-else`,children:`Everywhere else`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`data-focus`}),` and the focus ring also make your app keyboard-accessible on web and desktop. On touch devices the ring is not shown, so it is safe to apply everywhere.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`For a full TV surface, the `,_jsx(_components.a,{href:`/ui/tv`,children:`TV kit`}),` gives you the frame, shelves, cards and players, already sized to read from across the room.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"TV navigation","description":"Make your app usable with a TV remote: arrow keys, OK and Back.","href":"/ui/tv-navigation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Detection","slug":"detection","depth":2,"children":[]},{"title":"Making your own elements focusable","slug":"making-your-own-elements-focusable","depth":2,"children":[]},{"title":"Scopes and Back","slug":"scopes-and-back","depth":2,"children":[]},{"title":"Everywhere else","slug":"everywhere-else","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cskn","siteName":"cskn Developers","title":"TV navigation - cskn Developers","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T09:18:59.551Z","originalFileLocation":"ui/tv-navigation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Make your app usable with a TV remote: arrow keys, OK and Back.\">\u003cmeta data-mint-head name=\"application-name\" content=\"cskn Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"TV navigation - cskn Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Make your app usable with a TV remote: arrow keys, OK and Back.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"cskn Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cskn.dev/ui/tv-navigation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cskn.mintlify.site/_mintlify/api/og/v2?division=Platform\u0026amp;title=TV+navigation\u0026amp;description=Make+your+app+usable+with+a+TV+remote%3A+arrow+keys%2C+OK+and+Back.\u0026amp;theme=6a82b949ac7d04df3dad9ac1\u0026amp;signature=c256ec1cb9ba5592ebf8e9d292990291a551cece9f6417998472278d76670bef\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"TV navigation - cskn Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Make your app usable with a TV remote: arrow keys, OK and Back.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cskn.mintlify.site/_mintlify/api/og/v2?division=Platform\u0026amp;title=TV+navigation\u0026amp;description=Make+your+app+usable+with+a+TV+remote%3A+arrow+keys%2C+OK+and+Back.\u0026amp;theme=6a82b949ac7d04df3dad9ac1\u0026amp;signature=c256ec1cb9ba5592ebf8e9d292990291a551cece9f6417998472278d76670bef\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cskn/J7DrGtll2kzPzkW6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"cskn Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E7490\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cskn.dev/ui/tv-navigation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ui/tv-navigation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cskn.dev/#organization\",\"name\":\"cskn Developers\",\"url\":\"https://docs.cskn.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cskn/nVnP1SM0RHDt2P4O/logo/light.svg?fit=max\u0026auto=format\u0026n=nVnP1SM0RHDt2P4O\u0026q=85\u0026s=c32921af2ea7b26ed147c2fc20b7ccee\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cskn.dev#website\",\"name\":\"cskn Developers\",\"url\":\"https://docs.cskn.dev\",\"publisher\":{\"@id\":\"https://docs.cskn.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cskn.dev/ui/tv-navigation#webpage\",\"url\":\"https://docs.cskn.dev/ui/tv-navigation\",\"name\":\"TV navigation\",\"description\":\"Make your app usable with a TV remote: arrow keys, OK and Back.\",\"dateModified\":\"2026-11-11T09:18:59.551Z\",\"isPartOf\":{\"@id\":\"https://docs.cskn.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cskn.dev/ui/tv-navigation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cskn.dev/ui/tv-navigation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://docs.cskn.dev/ui/web\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TV navigation\",\"item\":\"https://docs.cskn.dev/ui/tv-navigation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cskn.dev/ui/tv-navigation#article\",\"headline\":\"TV navigation\",\"name\":\"TV navigation\",\"description\":\"Make your app usable with a TV remote: arrow keys, OK and Back.\",\"url\":\"https://docs.cskn.dev/ui/tv-navigation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cskn.dev/ui/tv-navigation#webpage\"},\"dateModified\":\"2026-11-11T09:18:59.551Z\",\"publisher\":{\"@id\":\"https://docs.cskn.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cskn.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"cskn Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"cskn Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ui/tv-navigation.md","siteName":"cskn Developers","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":""}]},{"tab":"@cskn/sdk","pages":[{"title":"@cskn/sdk","href":"/sdk/overview"}]},{"tab":"@cskn/ui","groups":[{"group":"Overview","pages":[{"title":"@cskn/ui","href":"/ui/overview"},{"title":"UIProvider","href":"/ui/provider"},{"title":"Theming","href":"/ui/theming"},{"title":"Layout","href":"/ui/layout"},{"title":"Error handling","href":"/ui/errors"}]},{"group":"Components","pages":[{"title":"Screen and Header","href":"/ui/components/screen"},{"title":"Buttons and links","href":"/ui/components/buttons"},{"title":"Forms","href":"/ui/components/forms"},{"title":"Content and display","href":"/ui/components/display"},{"title":"Navigation","href":"/ui/components/navigation"},{"title":"Overlays","href":"/ui/components/overlays"},{"title":"Feedback","href":"/ui/components/feedback"},{"title":"Tables and charts","href":"/ui/components/data"},{"title":"Icons","href":"/ui/components/icons"}]},{"group":"Stack navigation","pages":[{"title":"Stack navigation","href":"/ui/stack/overview"},{"title":"Screens and bars","href":"/ui/stack/screens"},{"title":"Grouped lists and forms","href":"/ui/stack/grouped-forms"},{"title":"Lists and pages","href":"/ui/stack/lists"},{"title":"Keyboard shortcuts","href":"/ui/stack/shortcuts"}]},{"group":"Platform","pages":[{"title":"Web surface","href":"/ui/web"},{"title":"Safe area","href":"/ui/safe-area"},{"title":"Desktop kit","href":"/ui/desktop"},{"title":"TV kit","description":"Build a 10-foot TV surface: the app frame, hero, shelves, grids, an audio player and a vertical clip feed, all driven with a remote.","href":"/ui/tv"},{"title":"TV navigation","href":"/ui/tv-navigation"}]},{"group":"Profile integration","pages":[{"title":"Settings panels","description":"Ready-made AppSettings and WidgetSettings panels, and the visibility notices.","href":"/ui/settings-panels"},{"title":"Widget renderers","href":"/ui/widgets"},{"title":"Theme rendering","href":"/ui/themes"}]}]}]},"basePath":"","title":"TV navigation - cskn Developers","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}