@adelin-io/cli 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -2
- package/authoring-release.json +174 -0
- package/package.json +30 -4
- package/runtime-integrity.json +9 -0
- package/scripts/adelin.mjs +7768 -0
- package/scripts/assemble-checkout.mjs +93 -0
- package/scripts/local-save.mjs +513 -0
- package/scripts/materialize.mjs +319 -0
- package/scripts/runtime.mjs +8950 -0
- package/scripts/typecheck.mjs +72 -0
- package/scripts/workspace-state.mjs +183 -0
- package/skill/README.md +77 -0
- package/skill/SKILL.md +100 -0
- package/skill/authoring/access.md +193 -0
- package/skill/authoring/analytics.md +20 -0
- package/skill/authoring/app-memory.md +128 -0
- package/skill/authoring/app-requirements.md +99 -0
- package/skill/authoring/app-structure.md +265 -0
- package/skill/authoring/assets.md +117 -0
- package/skill/authoring/auth.md +263 -0
- package/skill/authoring/content-binding.md +26 -0
- package/skill/authoring/i18n.md +184 -0
- package/skill/authoring/language.md +503 -0
- package/skill/authoring/local-workflow.md +1667 -0
- package/skill/authoring/offline/connectivity.md +50 -0
- package/skill/authoring/offline/example.md +102 -0
- package/skill/authoring/offline/history-sync.md +39 -0
- package/skill/authoring/offline/index.md +29 -0
- package/skill/authoring/offline/package-storage.md +37 -0
- package/skill/authoring/offline/platforms.md +35 -0
- package/skill/authoring/offline/startup-navigation.md +53 -0
- package/skill/authoring/platform-files.md +616 -0
- package/skill/authoring/player/casting.md +47 -0
- package/skill/authoring/player/controls.md +95 -0
- package/skill/authoring/player/downloads.md +90 -0
- package/skill/authoring/player/drm.md +31 -0
- package/skill/authoring/player/index.md +39 -0
- package/skill/authoring/player/live-dvr.md +74 -0
- package/skill/authoring/player/platforms.md +47 -0
- package/skill/authoring/player/playback.md +43 -0
- package/skill/authoring/player/tracks-subtitles.md +32 -0
- package/skill/authoring/profiles.md +213 -0
- package/skill/authoring/remote-keys.md +139 -0
- package/skill/authoring/search.md +27 -0
- package/skill/authoring/store.md +85 -0
- package/skill/authoring/tv-text-entry.md +146 -0
- package/skill/design/approved/README.md +14 -0
- package/skill/design/approved/vesper-phone-home.jpg +0 -0
- package/skill/design/approved/vesper-tv-detail.jpg +0 -0
- package/skill/design/approved/vesper-tv-home.jpg +0 -0
- package/skill/design/design-guide.md +610 -0
- package/skill/design/edge-to-edge.md +66 -0
- package/skill/design/icons.md +50 -0
- package/skill/design/responsive-layout.md +175 -0
- package/skill/design/safe-area.md +221 -0
- package/skill/design/streaming-playbook.md +131 -0
- package/skill/design/visual-review.md +150 -0
- package/skill/examples/README.md +24 -0
- package/skill/examples/cinema/DESIGN.md +58 -0
- package/skill/examples/cinema/app.tsx +17 -0
- package/skill/examples/cinema/assets/logo.png +0 -0
- package/skill/examples/cinema/components/Action.tsx +40 -0
- package/skill/examples/cinema/components/Action.tv.tsx +44 -0
- package/skill/examples/cinema/components/CatalogGrid.tsx +31 -0
- package/skill/examples/cinema/components/ContinueRail.tsx +98 -0
- package/skill/examples/cinema/components/Feedback.tsx +28 -0
- package/skill/examples/cinema/components/Field.tsx +41 -0
- package/skill/examples/cinema/components/LibraryRail.tsx +46 -0
- package/skill/examples/cinema/components/PlayAction.tsx +29 -0
- package/skill/examples/cinema/components/Root.tsx +59 -0
- package/skill/examples/cinema/components/Shell.tsx +70 -0
- package/skill/examples/cinema/components/Tab.tsx +22 -0
- package/skill/examples/cinema/components/TitleCard.tsx +68 -0
- package/skill/examples/cinema/components/TitleMeta.tsx +36 -0
- package/skill/examples/cinema/locales/en.ts +211 -0
- package/skill/examples/cinema/locales/lt.ts +211 -0
- package/skill/examples/cinema/preview/phone-home.jpg +0 -0
- package/skill/examples/cinema/preview/tv-detail.jpg +0 -0
- package/skill/examples/cinema/preview/tv-home.jpg +0 -0
- package/skill/examples/cinema/screens/portrait/Account.tsx +110 -0
- package/skill/examples/cinema/screens/portrait/Browse.tsx +73 -0
- package/skill/examples/cinema/screens/portrait/Detail.tsx +159 -0
- package/skill/examples/cinema/screens/portrait/Home.tsx +196 -0
- package/skill/examples/cinema/screens/portrait/Player.tsx +299 -0
- package/skill/examples/cinema/screens/portrait/Search.tsx +46 -0
- package/skill/examples/cinema/screens/portrait/Search.tv.tsx +55 -0
- package/skill/examples/cinema/screens/portrait/SignIn.tsx +101 -0
- package/skill/examples/cinema/screens/portrait/SignUp.tsx +106 -0
- package/skill/examples/cinema/store.tsx +132 -0
- package/skill/examples/cinema/theme.ts +32 -0
- package/skill/examples/documentary/DESIGN.md +33 -0
- package/skill/examples/documentary/app.tsx +17 -0
- package/skill/examples/documentary/components/Action.tsx +43 -0
- package/skill/examples/documentary/components/CatalogGrid.tsx +47 -0
- package/skill/examples/documentary/components/Feedback.tsx +27 -0
- package/skill/examples/documentary/components/Field.tsx +33 -0
- package/skill/examples/documentary/components/LibraryRail.tsx +47 -0
- package/skill/examples/documentary/components/Root.tsx +62 -0
- package/skill/examples/documentary/components/Shell.tsx +93 -0
- package/skill/examples/documentary/components/StoryCard.tsx +53 -0
- package/skill/examples/documentary/components/StoryMeta.tsx +22 -0
- package/skill/examples/documentary/preview/phone-home.jpg +0 -0
- package/skill/examples/documentary/preview/tv-detail.jpg +0 -0
- package/skill/examples/documentary/preview/tv-home.jpg +0 -0
- package/skill/examples/documentary/screens/portrait/Account.tsx +97 -0
- package/skill/examples/documentary/screens/portrait/Browse.tsx +71 -0
- package/skill/examples/documentary/screens/portrait/Detail.tsx +133 -0
- package/skill/examples/documentary/screens/portrait/Home.tsx +89 -0
- package/skill/examples/documentary/screens/portrait/Player.tsx +116 -0
- package/skill/examples/documentary/screens/portrait/Search.tsx +48 -0
- package/skill/examples/documentary/screens/portrait/SignIn.tsx +96 -0
- package/skill/examples/documentary/screens/portrait/SignUp.tsx +101 -0
- package/skill/examples/documentary/store.tsx +115 -0
- package/skill/examples/documentary/theme.ts +20 -0
- package/skill/examples/series/DESIGN.md +55 -0
- package/skill/examples/series/app.tsx +17 -0
- package/skill/examples/series/components/Action.tsx +42 -0
- package/skill/examples/series/components/CatalogGrid.tsx +43 -0
- package/skill/examples/series/components/ContinueRail.tsx +78 -0
- package/skill/examples/series/components/Feedback.tsx +26 -0
- package/skill/examples/series/components/Field.tsx +34 -0
- package/skill/examples/series/components/LibraryRail.tsx +38 -0
- package/skill/examples/series/components/OutcomeNote.tsx +28 -0
- package/skill/examples/series/components/PlayAction.tsx +29 -0
- package/skill/examples/series/components/RestoreAction.tsx +33 -0
- package/skill/examples/series/components/Root.tsx +75 -0
- package/skill/examples/series/components/SaveTitle.tsx +34 -0
- package/skill/examples/series/components/Shell.tsx +75 -0
- package/skill/examples/series/components/TitleCard.tsx +62 -0
- package/skill/examples/series/components/UnlockAction.tsx +10 -0
- package/skill/examples/series/preview/phone-home.jpg +0 -0
- package/skill/examples/series/preview/tv-detail.jpg +0 -0
- package/skill/examples/series/preview/tv-home.jpg +0 -0
- package/skill/examples/series/screens/portrait/Account.tsx +125 -0
- package/skill/examples/series/screens/portrait/Browse.tsx +61 -0
- package/skill/examples/series/screens/portrait/Detail.tsx +231 -0
- package/skill/examples/series/screens/portrait/Home.tsx +109 -0
- package/skill/examples/series/screens/portrait/MyList.tsx +44 -0
- package/skill/examples/series/screens/portrait/Plans.tsx +131 -0
- package/skill/examples/series/screens/portrait/Player.tsx +138 -0
- package/skill/examples/series/screens/portrait/Profiles.tsx +103 -0
- package/skill/examples/series/screens/portrait/Search.tsx +50 -0
- package/skill/examples/series/screens/portrait/SignIn.tsx +94 -0
- package/skill/examples/series/screens/portrait/SignUp.tsx +100 -0
- package/skill/examples/series/store.tsx +192 -0
- package/skill/examples/series/theme.ts +32 -0
- package/skill/guides/final-pricing-capabilities.md +13 -0
- package/skill/reference/api.md +842 -0
- package/skill/reference/components.md +1782 -0
- package/skill/reference/packages.md +24 -0
- package/skill/scripts/assemble-checkout.mjs +93 -0
- package/skill/scripts/local-save.mjs +513 -0
- package/skill/scripts/materialize.mjs +319 -0
- package/skill/scripts/workspace-state.mjs +183 -0
- package/types/adelin-access.d.ts +70 -0
- package/types/adelin-analytics.d.ts +5 -0
- package/types/adelin-assets.d.ts +26 -0
- package/types/adelin-auth.d.ts +37 -0
- package/types/adelin-content.d.ts +120 -0
- package/types/adelin-device.d.ts +195 -0
- package/types/adelin-downloads.d.ts +47 -0
- package/types/adelin-env.d.ts +8 -0
- package/types/adelin-globals.d.ts +19 -0
- package/types/adelin-i18n.d.ts +31 -0
- package/types/adelin-native-stack.d.ts +178 -0
- package/types/adelin-navigation.d.ts +264 -0
- package/types/adelin-profiles.d.ts +51 -0
- package/types/adelin-react.d.ts +49 -0
- package/types/adelin-reanimated.d.ts +376 -0
- package/types/adelin-storage.d.ts +9 -0
- package/types/adelin-store.d.ts +74 -0
- package/types/adelin-ui.d.ts +1518 -0
- package/types/adelin-utils.d.ts +7 -0
- package/types/adelin-worklets.d.ts +15 -0
- package/workspace-tsconfig.json +53 -0
|
@@ -0,0 +1,1782 @@
|
|
|
1
|
+
# Component Catalog
|
|
2
|
+
|
|
3
|
+
Generated from companion-v2 `componentMap.tsx`, composite `types.ts`, primitive `contracts.ts` and parsed block schemas with canonical UI declarations. Do not hand-edit — run `pnpm --filter @adelin/project-x-dashboard-ai-builder generate:catalog`.
|
|
4
|
+
|
|
5
|
+
## Authored composition
|
|
6
|
+
|
|
7
|
+
The app root declares `const Stack = createNativeStackNavigator()` from @adelin/native-stack and registers every page as a `Stack.Screen`. Each registered screen returns its content inside `<Screen>` from @adelin/ui, the route focus boundary. Ordinary props and children compose the rest; there is no fixed shell, UI insertion Slot, or navigation configuration file.
|
|
8
|
+
|
|
9
|
+
Canonical workspace navigation declarations:
|
|
10
|
+
```ts
|
|
11
|
+
/** Canonical authored navigation declarations for an Adelin workspace, mirroring `@react-navigation/native`. */
|
|
12
|
+
declare module "@adelin/navigation" {
|
|
13
|
+
type DialectValue = import("@adelin/content").DialectValue;
|
|
14
|
+
type Node = {} | null | undefined;
|
|
15
|
+
type Keyof<T extends {}> = Extract<keyof T, string>;
|
|
16
|
+
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
17
|
+
type NavigateOptions = { merge?: boolean; pop?: boolean };
|
|
18
|
+
type NavigateArgs<P extends {}, R extends keyof P> = R extends unknown
|
|
19
|
+
? undefined extends P[R] ? [screen: R, params?: P[R], options?: NavigateOptions] : [screen: R, params: P[R], options?: NavigateOptions]
|
|
20
|
+
: never;
|
|
21
|
+
type NavigateObject<P extends {}, R extends keyof P> = R extends unknown
|
|
22
|
+
? { name: R; params?: P[R]; path?: string; merge?: boolean; pop?: boolean }
|
|
23
|
+
: never;
|
|
24
|
+
type ParamArgs<P extends {}, R extends keyof P> = R extends unknown ? undefined extends P[R] ? [screen: R, params?: P[R]] : [screen: R, params: P[R]] : never;
|
|
25
|
+
type EventMapBase = Record<string, { data?: unknown; canPreventDefault?: boolean }>;
|
|
26
|
+
type EventMapCore<State> = {
|
|
27
|
+
focus: { data: undefined };
|
|
28
|
+
blur: { data: undefined };
|
|
29
|
+
state: { data: { state: State } };
|
|
30
|
+
beforeRemove: { data: { action: NavigationAction }; canPreventDefault: true };
|
|
31
|
+
};
|
|
32
|
+
type EventListener<M extends EventMapBase, E extends keyof M> = (
|
|
33
|
+
e: EventArg<E, M[E]["canPreventDefault"] extends true ? true : false, M[E]["data"]>,
|
|
34
|
+
) => void;
|
|
35
|
+
class ParamStore<T extends [unknown, unknown, unknown]> {
|
|
36
|
+
protected ""?: T;
|
|
37
|
+
}
|
|
38
|
+
type Context<T> = {
|
|
39
|
+
Provider: (props: { value: T; children?: Node }) => unknown;
|
|
40
|
+
Consumer: (props: { children: (value: T) => Node }) => unknown;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type AuthoredComponent = (props: never) => unknown;
|
|
44
|
+
|
|
45
|
+
/** Every screen name a navigator registers, mapped to its params (`undefined` for none). */
|
|
46
|
+
export type ParamListBase = Record<string, object | undefined>;
|
|
47
|
+
/** An action a navigator handles, as `CommonActions` and `StackActions` create it. */
|
|
48
|
+
export type NavigationAction = { readonly type: string; readonly payload?: object; readonly source?: string; readonly target?: string };
|
|
49
|
+
/** One route on the stack: its key, name and params. */
|
|
50
|
+
export type Route<Name extends string = string, Params = object | undefined> = Readonly<{ key: string; name: Name; path?: string }> &
|
|
51
|
+
(undefined extends Params ? Readonly<{ params?: Readonly<Params> }> : Readonly<{ params: Readonly<Params> }>);
|
|
52
|
+
/** The route of screen `N` in param list `P`. */
|
|
53
|
+
export type RouteProp<P extends ParamListBase, N extends keyof P = Keyof<P>> = Route<Extract<N, string>, P[N]>;
|
|
54
|
+
/** A navigator's state: its routes and which one is shown. */
|
|
55
|
+
export interface NavigationState<P extends {} = ParamListBase> {
|
|
56
|
+
index?: number;
|
|
57
|
+
key?: string;
|
|
58
|
+
type?: string;
|
|
59
|
+
stale?: boolean;
|
|
60
|
+
routeNames?: Keyof<P>[];
|
|
61
|
+
history?: Record<string, unknown>[];
|
|
62
|
+
routes: { name: string; key?: string; path?: string; params?: Record<string, unknown>; state?: NavigationState }[];
|
|
63
|
+
preloadedRoutes?: { name: string; key?: string; path?: string; params?: Record<string, unknown>; state?: NavigationState }[];
|
|
64
|
+
}
|
|
65
|
+
/** The value a listener receives; `preventDefault` exists only where the action can be stopped. */
|
|
66
|
+
export type EventArg<EventName, CanPreventDefault extends boolean | undefined = false, Data = undefined> = { readonly type: EventName; readonly target?: string } &
|
|
67
|
+
(CanPreventDefault extends true ? { readonly defaultPrevented: boolean; preventDefault(): void } : {}) &
|
|
68
|
+
(undefined extends Data ? { readonly data?: Readonly<Data> } : { readonly data: Readonly<Data> });
|
|
69
|
+
/** The navigation object a screen of navigator `P` receives. */
|
|
70
|
+
export type NavigationProp<
|
|
71
|
+
P extends {},
|
|
72
|
+
N extends keyof P = Keyof<P>,
|
|
73
|
+
NavigatorID extends string | undefined = string | undefined,
|
|
74
|
+
State extends NavigationState<any> = NavigationState<P>,
|
|
75
|
+
ScreenOptions extends {} = {},
|
|
76
|
+
EventMap extends EventMapBase = {},
|
|
77
|
+
> = {
|
|
78
|
+
dispatch(action: NavigationAction | ((state: Readonly<State>) => NavigationAction)): void;
|
|
79
|
+
navigate<R extends keyof P>(...args: NavigateArgs<P, R>): void;
|
|
80
|
+
navigate<R extends keyof P>(options: NavigateObject<P, R>): void;
|
|
81
|
+
/** @deprecated Use navigate(name, params, { pop: true }). */
|
|
82
|
+
navigateDeprecated<R extends keyof P>(...args: ParamArgs<P, R>): void;
|
|
83
|
+
preload<R extends keyof P>(...args: ParamArgs<P, R>): void;
|
|
84
|
+
push<R extends keyof P>(...args: ParamArgs<P, R>): void;
|
|
85
|
+
replace<R extends keyof P>(...args: ParamArgs<P, R>): void;
|
|
86
|
+
pop(count?: number): void;
|
|
87
|
+
popTo<R extends keyof P>(...args: NavigateArgs<P, R>): void;
|
|
88
|
+
popToTop(): void;
|
|
89
|
+
reset(state: NavigationState): void;
|
|
90
|
+
goBack(): void;
|
|
91
|
+
isFocused(): boolean;
|
|
92
|
+
canGoBack(): boolean;
|
|
93
|
+
getId(): string | undefined;
|
|
94
|
+
getParent<T = NavigationProp<ParamListBase> | undefined>(id?: NavigatorID): T;
|
|
95
|
+
getState(): State;
|
|
96
|
+
setParams(params: P[N] extends undefined ? undefined : Partial<P[N]>): void;
|
|
97
|
+
replaceParams(params: P[N] extends undefined ? undefined : P[N]): void;
|
|
98
|
+
addListener<E extends Keyof<EventMap & EventMapCore<State>>>(type: E, callback: EventListener<EventMap & EventMapCore<State>, E>): () => void;
|
|
99
|
+
removeListener<E extends Keyof<EventMap & EventMapCore<State>>>(type: E, callback: EventListener<EventMap & EventMapCore<State>, E>): void;
|
|
100
|
+
} & ParamStore<[P, N, EventMap]>;
|
|
101
|
+
type ParamsOf<X> = X extends ParamStore<[infer T, unknown, unknown]> ? T : never;
|
|
102
|
+
type RouteNameOf<X> = X extends ParamStore<[unknown, infer R, unknown]> ? R : string;
|
|
103
|
+
/** A screen's navigation combined with an enclosing navigator's, so either's screens can be reached. */
|
|
104
|
+
export type CompositeNavigationProp<A extends NavigationProp<any, any, any, any, any, any>, B extends NavigationProp<any, any, any, any, any, any>> = Omit<A & B, keyof NavigationProp<{}>> &
|
|
105
|
+
NavigationProp<ParamsOf<A> & ParamsOf<B>, RouteNameOf<A>>;
|
|
106
|
+
/** Screen props whose navigation also reaches an enclosing navigator's screens. */
|
|
107
|
+
export type CompositeScreenProps<
|
|
108
|
+
A extends { navigation: NavigationProp<any, any, any, any, any, any>; route: RouteProp<any, any> },
|
|
109
|
+
B extends { navigation: NavigationProp<any, any, any, any, any, any> },
|
|
110
|
+
> = { navigation: CompositeNavigationProp<A["navigation"], B["navigation"]>; route: A["route"] };
|
|
111
|
+
/** Params that open a screen of a nested navigator. */
|
|
112
|
+
export type NavigatorScreenParams<P extends {}> =
|
|
113
|
+
| { screen?: never; params?: never; path?: string; state: NavigationState | undefined }
|
|
114
|
+
| {
|
|
115
|
+
[R in keyof P]: undefined extends P[R]
|
|
116
|
+
? { screen: R; params?: P[R]; merge?: boolean; initial?: boolean; path?: string; pop?: boolean; state?: never }
|
|
117
|
+
: { screen: R; params: P[R]; merge?: boolean; initial?: boolean; path?: string; pop?: boolean; state?: never };
|
|
118
|
+
}[keyof P];
|
|
119
|
+
type FontStyle = { fontFamily: string; fontWeight: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" };
|
|
120
|
+
/** The colours and fonts a NavigationContainer theme provides. */
|
|
121
|
+
export interface Theme {
|
|
122
|
+
dark: boolean;
|
|
123
|
+
colors: { primary: string; background: string; card: string; text: string; border: string; notification: string };
|
|
124
|
+
fonts: { regular: FontStyle; medium: FontStyle; bold: FontStyle; heavy: FontStyle };
|
|
125
|
+
}
|
|
126
|
+
type ContainerEventMap = {
|
|
127
|
+
ready: { data: undefined };
|
|
128
|
+
state: { data: { state: NavigationState | undefined } };
|
|
129
|
+
options: { data: { options: object } };
|
|
130
|
+
};
|
|
131
|
+
/** The navigation object of the whole app, reachable outside any screen. */
|
|
132
|
+
export type NavigationContainerRef<P extends {}> = Pick<
|
|
133
|
+
NavigationProp<P>,
|
|
134
|
+
"dispatch" | "navigate" | "preload" | "reset" | "goBack" | "isFocused" | "canGoBack" | "getId" | "getState" | "setParams" | "replaceParams"
|
|
135
|
+
> & {
|
|
136
|
+
resetRoot(state?: NavigationState): void;
|
|
137
|
+
getRootState(): NavigationState | undefined;
|
|
138
|
+
getCurrentRoute(): Route | undefined;
|
|
139
|
+
getCurrentOptions(): object | undefined;
|
|
140
|
+
isReady(): boolean;
|
|
141
|
+
addListener<E extends Keyof<ContainerEventMap>>(type: E, callback: EventListener<ContainerEventMap, E>): () => void;
|
|
142
|
+
removeListener<E extends Keyof<ContainerEventMap>>(type: E, callback: EventListener<ContainerEventMap, E>): void;
|
|
143
|
+
};
|
|
144
|
+
type NavigationContainerRefWithCurrent<P extends {}> = NavigationContainerRef<P> & { current: NavigationContainerRef<P> | null };
|
|
145
|
+
type StaticScreens = Record<string, unknown>;
|
|
146
|
+
type ParamsForStaticScreen<S> = S extends { screen: infer C } ? ParamsForStaticScreen<C>
|
|
147
|
+
: S extends { config: { screens?: StaticScreens } } ? NavigatorScreenParams<StaticParamList<S>> | undefined
|
|
148
|
+
: S extends (props: { route: { params: infer Params } }) => unknown ? (unknown extends Params ? undefined : Params)
|
|
149
|
+
: undefined;
|
|
150
|
+
type StaticScreensParamList<S> = { [K in Keyof<S & {}>]: ParamsForStaticScreen<(S & {})[K]> };
|
|
151
|
+
type StaticGroupsParamList<G> = G extends Record<string, { screens: StaticScreens }> ? UnionToIntersection<StaticScreensParamList<G[keyof G]["screens"]>> : {};
|
|
152
|
+
/** A static-config screen's props: its route with the params type given. */
|
|
153
|
+
export type StaticScreenProps<T extends Record<string, unknown> | undefined> = { route: { params: T } };
|
|
154
|
+
/** The param list of a navigator made from a static configuration. */
|
|
155
|
+
export type StaticParamList<T extends { config: { screens?: StaticScreens; groups?: Record<string, { screens: StaticScreens }> } }> = StaticScreensParamList<
|
|
156
|
+
T["config"]["screens"]
|
|
157
|
+
> &
|
|
158
|
+
StaticGroupsParamList<T["config"]["groups"]>;
|
|
159
|
+
interface NavigationContainerProps {
|
|
160
|
+
theme?: Theme;
|
|
161
|
+
ref?: { current: NavigationContainerRef<any> | null } | null;
|
|
162
|
+
onReady?: () => void;
|
|
163
|
+
onStateChange?: (state: Readonly<NavigationState> | undefined) => void;
|
|
164
|
+
onUnhandledAction?: (action: Readonly<NavigationAction>) => void;
|
|
165
|
+
initialState?: NavigationState;
|
|
166
|
+
fallback?: Node;
|
|
167
|
+
direction?: "ltr" | "rtl";
|
|
168
|
+
documentTitle?: { enabled?: boolean; formatter?: (options: Record<string, any> | undefined, route: Route | undefined) => string };
|
|
169
|
+
navigationInChildEnabled?: boolean;
|
|
170
|
+
children?: Node;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** The app's one navigation tree, wrapped around the root stack. */
|
|
174
|
+
export function NavigationContainer(props: NavigationContainerProps): unknown;
|
|
175
|
+
/** The container without linking, document title or `direction`. */
|
|
176
|
+
export function BaseNavigationContainer(props: Omit<NavigationContainerProps, "fallback" | "direction" | "documentTitle">): unknown;
|
|
177
|
+
/** Makes the NavigationContainer inside it a separate tree: its own screens, Back and ref. */
|
|
178
|
+
export function NavigationIndependentTree(props: { children?: Node }): unknown;
|
|
179
|
+
/** True between a NavigationIndependentTree and the container inside it. */
|
|
180
|
+
export function useNavigationIndependentTree(): boolean;
|
|
181
|
+
/** For server rendering only; on a device it renders its children unchanged. */
|
|
182
|
+
export function ServerContainer(props: { location: { pathname: string; search?: string }; children?: Node }): unknown;
|
|
183
|
+
/** The navigation object of the screen it is called in. */
|
|
184
|
+
export function useNavigation<T = NavigationProp<ParamListBase>>(): T;
|
|
185
|
+
/** The route of the screen it is called in: its key and params. */
|
|
186
|
+
export function useRoute(): { key: string; name: string; params: Record<string, DialectValue> };
|
|
187
|
+
export function useRoute<T extends Route>(): T;
|
|
188
|
+
/** Runs the effect each time the screen gains focus; wrap it in useCallback. */
|
|
189
|
+
export function useFocusEffect(effect: () => void | (() => void)): void;
|
|
190
|
+
/** Whether the screen it is called in is focused. */
|
|
191
|
+
export function useIsFocused(): boolean;
|
|
192
|
+
/** A value selected from the enclosing navigator's state. */
|
|
193
|
+
export function useNavigationState<P extends ParamListBase = ParamListBase, T = unknown>(selector: (state: NavigationState<P>) => T): T;
|
|
194
|
+
/** Asks the callback before the screen is removed while `preventRemove` is true. */
|
|
195
|
+
export function usePreventRemove(preventRemove: boolean, callback: (options: { data: { action: NavigationAction } }) => void): void;
|
|
196
|
+
/** The NavigationContainer theme. */
|
|
197
|
+
export function useTheme(): Theme;
|
|
198
|
+
/** Scrolls the referenced list to the top when its screen's section is chosen again. */
|
|
199
|
+
export function useScrollToTop(ref: { current: unknown }): void;
|
|
200
|
+
/** The text direction the NavigationContainer uses. */
|
|
201
|
+
export function useLocale(): { direction: "ltr" | "rtl" };
|
|
202
|
+
/** A ref to the app's navigation object, made inside a component. */
|
|
203
|
+
export function useNavigationContainerRef<P extends {} = ParamListBase>(): NavigationContainerRefWithCurrent<P>;
|
|
204
|
+
/** A ref to the app's navigation object, made at the top of a file. */
|
|
205
|
+
export function createNavigationContainerRef<P extends {} = ParamListBase>(): NavigationContainerRefWithCurrent<P>;
|
|
206
|
+
/** Action creators every navigator handles, passed to navigation.dispatch. */
|
|
207
|
+
export const CommonActions: {
|
|
208
|
+
goBack(): NavigationAction;
|
|
209
|
+
navigate(name: string, params?: object, options?: NavigateOptions): NavigationAction;
|
|
210
|
+
navigate(options: { name: string; params?: object; path?: string; merge?: boolean; pop?: boolean }): NavigationAction;
|
|
211
|
+
/** @deprecated Use navigate(name, params, { pop: true }). */
|
|
212
|
+
navigateDeprecated(name: string, params?: object): NavigationAction;
|
|
213
|
+
preload(name: string, params?: object): NavigationAction;
|
|
214
|
+
reset(state: NavigationState): NavigationAction;
|
|
215
|
+
setParams(params: object): NavigationAction;
|
|
216
|
+
replaceParams(params: object): NavigationAction;
|
|
217
|
+
};
|
|
218
|
+
/** Stack action creators, passed to navigation.dispatch. */
|
|
219
|
+
export const StackActions: {
|
|
220
|
+
replace(name: string, params?: object): NavigationAction;
|
|
221
|
+
push(name: string, params?: object): NavigationAction;
|
|
222
|
+
pop(count?: number): NavigationAction;
|
|
223
|
+
popToTop(): NavigationAction;
|
|
224
|
+
popTo(name: string, params?: object, options?: { merge?: boolean }): NavigationAction;
|
|
225
|
+
};
|
|
226
|
+
/** The light theme NavigationContainer uses by default. */
|
|
227
|
+
export const DefaultTheme: Theme;
|
|
228
|
+
/** The dark theme. */
|
|
229
|
+
export const DarkTheme: Theme;
|
|
230
|
+
/** Provides `value` to useTheme below it. */
|
|
231
|
+
export function ThemeProvider(props: { value: Theme; children?: Node }): unknown;
|
|
232
|
+
/** The theme context useTheme reads. */
|
|
233
|
+
export const ThemeContext: Context<Theme | undefined>;
|
|
234
|
+
/** The navigation object of the enclosing screen. */
|
|
235
|
+
export const NavigationContext: Context<NavigationProp<ParamListBase> | undefined>;
|
|
236
|
+
/** The route of the enclosing screen. */
|
|
237
|
+
export const NavigationRouteContext: Context<Route | undefined>;
|
|
238
|
+
/** The text direction of the NavigationContainer. */
|
|
239
|
+
export const LocaleDirContext: Context<"ltr" | "rtl">;
|
|
240
|
+
/** A pressable text that runs its `onPress`, then navigates to `screen` or dispatches `action`; other props are Text props. */
|
|
241
|
+
export function Link(props: ({ screen: string; params?: object; action?: NavigationAction } | { screen?: undefined; params?: undefined; action: NavigationAction }) & Omit<import("@adelin/ui").TextProps, "style" | "children" | "onPress"> & {
|
|
242
|
+
style?: unknown;
|
|
243
|
+
onPress?: (event: { preventDefault(): void; defaultPrevented?: boolean }) => void;
|
|
244
|
+
children?: Node;
|
|
245
|
+
}): unknown;
|
|
246
|
+
/** The focused route at the bottom of a nested state. */
|
|
247
|
+
export function findFocusedRoute(state: NavigationState): Route | undefined;
|
|
248
|
+
/** The name of the focused screen inside the navigator a route renders. */
|
|
249
|
+
export function getFocusedRouteNameFromRoute(route: Partial<Route>): string | undefined;
|
|
250
|
+
/** The root component of a navigator made from a static configuration. */
|
|
251
|
+
export function createStaticNavigation(tree: { config: object }): (props: Omit<NavigationContainerProps, "children">) => unknown;
|
|
252
|
+
/** @deprecated Use RootStack.getComponent(). */
|
|
253
|
+
export function createComponentForStaticNavigation(tree: { config: object }, displayName: string): () => unknown;
|
|
254
|
+
/** The app-wide navigation object, for callbacks outside any screen. */
|
|
255
|
+
export const appNavigation: NavigationProp<ParamListBase>;
|
|
256
|
+
|
|
257
|
+
export interface AppConfig {
|
|
258
|
+
name: string;
|
|
259
|
+
version: string;
|
|
260
|
+
root: AuthoredComponent;
|
|
261
|
+
/** A separate authored entry for explicitly enabled offline startup. */
|
|
262
|
+
offline?: { root: AuthoredComponent };
|
|
263
|
+
statusBar?: { style?: string };
|
|
264
|
+
onBack?: () => void;
|
|
265
|
+
/** TV text entry currently uses the app keyboard for either value; omit this setting. */
|
|
266
|
+
tvKeyboard?: "custom" | "native";
|
|
267
|
+
/** One shared download library per device; `perAccount: true` gives each signed-in account its own. */
|
|
268
|
+
downloads?: { perAccount?: boolean };
|
|
269
|
+
/** Persistent visual direction for later app edits. */
|
|
270
|
+
designIntent?: { audience: string; thesis: string; palette: string; typography: string; composition: string; motif: string };
|
|
271
|
+
}
|
|
272
|
+
/** The application metadata and freely authored root component. */
|
|
273
|
+
export function defineApp(config: AppConfig): AppConfig;
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
```ts
|
|
277
|
+
/** Canonical authored native-stack declarations for an Adelin workspace, mirroring `@react-navigation/native-stack`. */
|
|
278
|
+
declare module "@adelin/native-stack" {
|
|
279
|
+
import type { EventArg, NavigationProp, NavigationState, ParamListBase, RouteProp, Theme } from "@adelin/navigation";
|
|
280
|
+
import type { StyleProp, ViewStyle } from "@adelin/ui";
|
|
281
|
+
|
|
282
|
+
type Node = {} | null | undefined;
|
|
283
|
+
type Keyof<T extends {}> = Extract<keyof T, string>;
|
|
284
|
+
type ScrollEdgeEffect = "automatic" | "hard" | "soft" | "hidden";
|
|
285
|
+
type OptionsOrFunction<P extends ParamListBase, N extends keyof P> =
|
|
286
|
+
| NativeStackNavigationOptions
|
|
287
|
+
| ((args: NativeStackOptionsArgs<P, N>) => NativeStackNavigationOptions);
|
|
288
|
+
type ListenerMap = NativeStackNavigationEventMap & {
|
|
289
|
+
focus: { data: undefined };
|
|
290
|
+
blur: { data: undefined };
|
|
291
|
+
state: { data: { state: NavigationState } };
|
|
292
|
+
beforeRemove: { data: { action: { readonly type: string; readonly payload?: object } }; canPreventDefault: true };
|
|
293
|
+
};
|
|
294
|
+
type ScreenListeners = {
|
|
295
|
+
[E in keyof ListenerMap]?: (e: EventArg<E, ListenerMap[E] extends { canPreventDefault: true } ? true : false, ListenerMap[E]["data"]>) => void;
|
|
296
|
+
};
|
|
297
|
+
type ListenersOrFunction<P extends ParamListBase, N extends keyof P> =
|
|
298
|
+
| ScreenListeners
|
|
299
|
+
| ((args: { route: RouteProp<P, N>; navigation: NativeStackNavigationProp<P, N> }) => ScreenListeners);
|
|
300
|
+
type LayoutArgs<P extends ParamListBase, N extends keyof P> = {
|
|
301
|
+
route: RouteProp<P, N>;
|
|
302
|
+
options: NativeStackNavigationOptions;
|
|
303
|
+
navigation: NativeStackNavigationProp<P, N>;
|
|
304
|
+
theme: Theme;
|
|
305
|
+
children: Node;
|
|
306
|
+
};
|
|
307
|
+
type ScreenComponent<P extends ParamListBase, N extends keyof P> = ((props: { route: RouteProp<P, N>; navigation: any }) => unknown) | ((props: {}) => unknown);
|
|
308
|
+
type ScreenSource<P extends ParamListBase, N extends keyof P> =
|
|
309
|
+
| { component: ScreenComponent<P, N>; getComponent?: never; children?: never }
|
|
310
|
+
| { getComponent: () => ScreenComponent<P, N>; component?: never; children?: never }
|
|
311
|
+
| { children: (props: { route: RouteProp<P, N>; navigation: NativeStackNavigationProp<P, N> }) => Node; component?: never; getComponent?: never };
|
|
312
|
+
type ScreenProps<P extends ParamListBase, N extends keyof P> = ScreenSource<P, N> & {
|
|
313
|
+
name: N;
|
|
314
|
+
options?: OptionsOrFunction<P, N>;
|
|
315
|
+
listeners?: ListenersOrFunction<P, N>;
|
|
316
|
+
initialParams?: Partial<P[N]>;
|
|
317
|
+
getId?: (args: { params: Readonly<P[N]> }) => string | undefined;
|
|
318
|
+
navigationKey?: string;
|
|
319
|
+
layout?: (props: LayoutArgs<P, N>) => Node;
|
|
320
|
+
};
|
|
321
|
+
type GroupProps<P extends ParamListBase> = {
|
|
322
|
+
screenOptions?: OptionsOrFunction<P, keyof P>;
|
|
323
|
+
navigationKey?: string;
|
|
324
|
+
screenLayout?: (props: LayoutArgs<P, keyof P>) => Node;
|
|
325
|
+
children?: Node;
|
|
326
|
+
};
|
|
327
|
+
type TypedNavigator<P extends ParamListBase> = {
|
|
328
|
+
Navigator: (props: NativeStackNavigatorProps<P>) => unknown;
|
|
329
|
+
Screen: <N extends Keyof<P>>(props: ScreenProps<P, N>) => unknown;
|
|
330
|
+
Group: (props: GroupProps<P>) => unknown;
|
|
331
|
+
};
|
|
332
|
+
type StaticScreen = ((props: never) => unknown) | { config: object } | (StaticScreenConfig & { screen: ((props: never) => unknown) | { config: object } });
|
|
333
|
+
type StaticScreenConfig = {
|
|
334
|
+
options?: OptionsOrFunction<ParamListBase, string>;
|
|
335
|
+
listeners?: ListenersOrFunction<ParamListBase, string>;
|
|
336
|
+
initialParams?: object;
|
|
337
|
+
getId?: (args: { params: Readonly<object | undefined> }) => string | undefined;
|
|
338
|
+
navigationKey?: string;
|
|
339
|
+
layout?: (props: LayoutArgs<ParamListBase, string>) => Node;
|
|
340
|
+
if?: () => boolean;
|
|
341
|
+
};
|
|
342
|
+
type StaticNavigatorProps = Omit<NativeStackNavigatorProps, "children">;
|
|
343
|
+
type StaticConfig = {
|
|
344
|
+
screens?: Record<string, StaticScreen>;
|
|
345
|
+
groups?: Record<string, { screens: Record<string, StaticScreen>; screenOptions?: OptionsOrFunction<ParamListBase, string>; navigationKey?: string; screenLayout?: (props: LayoutArgs<ParamListBase, string>) => Node; if?: () => boolean }>;
|
|
346
|
+
initialRouteName?: string;
|
|
347
|
+
screenOptions?: OptionsOrFunction<ParamListBase, string>;
|
|
348
|
+
screenListeners?: ListenersOrFunction<ParamListBase, string>;
|
|
349
|
+
id?: string;
|
|
350
|
+
layout?: NativeStackNavigatorProps["layout"];
|
|
351
|
+
screenLayout?: (props: LayoutArgs<ParamListBase, string>) => Node;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
/** What a native stack announces to `listeners` and `navigation.addListener`, beside focus, blur, state and beforeRemove. */
|
|
355
|
+
export type NativeStackNavigationEventMap = {
|
|
356
|
+
transitionStart: { data: { closing: boolean } };
|
|
357
|
+
transitionEnd: { data: { closing: boolean } };
|
|
358
|
+
gestureCancel: { data: undefined };
|
|
359
|
+
sheetDetentChange: { data: { index: number; stable: boolean } };
|
|
360
|
+
};
|
|
361
|
+
/** The navigation object of screen `N` in a native stack. */
|
|
362
|
+
export type NativeStackNavigationProp<P extends ParamListBase, N extends keyof P = string, NavigatorID extends string | undefined = undefined> = NavigationProp<
|
|
363
|
+
P,
|
|
364
|
+
N,
|
|
365
|
+
NavigatorID,
|
|
366
|
+
NavigationState<P>,
|
|
367
|
+
NativeStackNavigationOptions,
|
|
368
|
+
NativeStackNavigationEventMap
|
|
369
|
+
>;
|
|
370
|
+
/** The props a native stack passes a screen component. */
|
|
371
|
+
export type NativeStackScreenProps<P extends ParamListBase, N extends keyof P = string, NavigatorID extends string | undefined = undefined> = {
|
|
372
|
+
navigation: NativeStackNavigationProp<P, N, NavigatorID>;
|
|
373
|
+
route: RouteProp<P, N>;
|
|
374
|
+
};
|
|
375
|
+
/** What an `options` or `screenOptions` function receives. */
|
|
376
|
+
export type NativeStackOptionsArgs<P extends ParamListBase, N extends keyof P = keyof P, NavigatorID extends string | undefined = undefined> = NativeStackScreenProps<P, N, NavigatorID> & {
|
|
377
|
+
theme: Theme;
|
|
378
|
+
};
|
|
379
|
+
/** The screen options a native stack applies; screens have no header, so no header options exist. */
|
|
380
|
+
export type NativeStackNavigationOptions = {
|
|
381
|
+
autoHideHomeIndicator?: boolean;
|
|
382
|
+
keyboardHandlingEnabled?: boolean;
|
|
383
|
+
/** @deprecated Android draws apps edge to edge, so this has no effect. */
|
|
384
|
+
navigationBarColor?: string;
|
|
385
|
+
/** @deprecated Android draws apps edge to edge, so this has no effect. */
|
|
386
|
+
navigationBarTranslucent?: boolean;
|
|
387
|
+
navigationBarHidden?: boolean;
|
|
388
|
+
statusBarAnimation?: "none" | "fade" | "slide";
|
|
389
|
+
/** @deprecated Android draws apps edge to edge, so this has no effect. */
|
|
390
|
+
statusBarBackgroundColor?: string;
|
|
391
|
+
statusBarHidden?: boolean;
|
|
392
|
+
statusBarStyle?: "inverted" | "auto" | "light" | "dark";
|
|
393
|
+
/** @deprecated Android draws apps edge to edge, so this has no effect. */
|
|
394
|
+
statusBarTranslucent?: boolean;
|
|
395
|
+
gestureDirection?: "vertical" | "horizontal";
|
|
396
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
397
|
+
animationMatchesGesture?: boolean;
|
|
398
|
+
fullScreenGestureEnabled?: boolean;
|
|
399
|
+
fullScreenGestureShadowEnabled?: boolean;
|
|
400
|
+
gestureEnabled?: boolean;
|
|
401
|
+
gestureResponseDistance?: { start?: number; end?: number; top?: number; bottom?: number };
|
|
402
|
+
animationTypeForReplace?: "push" | "pop";
|
|
403
|
+
animation?:
|
|
404
|
+
| "default"
|
|
405
|
+
| "fade"
|
|
406
|
+
| "fade_from_bottom"
|
|
407
|
+
| "flip"
|
|
408
|
+
| "none"
|
|
409
|
+
| "simple_push"
|
|
410
|
+
| "slide_from_bottom"
|
|
411
|
+
| "slide_from_right"
|
|
412
|
+
| "slide_from_left"
|
|
413
|
+
| "ios_from_right"
|
|
414
|
+
| "ios_from_left";
|
|
415
|
+
animationDuration?: number;
|
|
416
|
+
presentation?: "card" | "modal" | "transparentModal" | "containedModal" | "containedTransparentModal" | "fullScreenModal" | "formSheet" | "pageSheet";
|
|
417
|
+
sheetAllowedDetents?: number[] | "fitToContents";
|
|
418
|
+
sheetElevation?: number;
|
|
419
|
+
sheetExpandsWhenScrolledToEdge?: boolean;
|
|
420
|
+
sheetCornerRadius?: number;
|
|
421
|
+
sheetInitialDetentIndex?: number | "last";
|
|
422
|
+
sheetGrabberVisible?: boolean;
|
|
423
|
+
sheetLargestUndimmedDetentIndex?: number | "none" | "last";
|
|
424
|
+
sheetShouldOverflowTopInset?: boolean;
|
|
425
|
+
sheetResizeAnimationEnabled?: boolean;
|
|
426
|
+
orientation?: "default" | "all" | "portrait" | "portrait_up" | "portrait_down" | "landscape" | "landscape_left" | "landscape_right";
|
|
427
|
+
/** iOS 26 edge effect of the screen's first ScrollView, per edge. */
|
|
428
|
+
scrollEdgeEffects?: { top?: ScrollEdgeEffect; bottom?: ScrollEdgeEffect; left?: ScrollEdgeEffect; right?: ScrollEdgeEffect };
|
|
429
|
+
unstable_sheetFooter?: () => Node;
|
|
430
|
+
};
|
|
431
|
+
/** The props of `Stack.Navigator`. */
|
|
432
|
+
export type NativeStackNavigatorProps<P extends ParamListBase = ParamListBase> = {
|
|
433
|
+
id?: string;
|
|
434
|
+
initialRouteName?: Keyof<P>;
|
|
435
|
+
screenOptions?: OptionsOrFunction<P, keyof P>;
|
|
436
|
+
screenListeners?: ListenersOrFunction<P, keyof P>;
|
|
437
|
+
layout?: (props: { state: NavigationState<P>; navigation: NavigationProp<P>; descriptors: Record<string, unknown>; children: Node }) => Node;
|
|
438
|
+
screenLayout?: (props: LayoutArgs<P, keyof P>) => Node;
|
|
439
|
+
children?: Node;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/** A native stack navigator, used as `<Stack.Navigator>`, `<Stack.Screen>` and `<Stack.Group>`, or built from a static configuration. */
|
|
443
|
+
export function createNativeStackNavigator<P extends ParamListBase = ParamListBase>(): TypedNavigator<P>;
|
|
444
|
+
export function createNativeStackNavigator<Config extends StaticConfig>(
|
|
445
|
+
config: Config,
|
|
446
|
+
): TypedNavigator<ParamListBase> & {
|
|
447
|
+
config: Config;
|
|
448
|
+
getComponent(): (props: StaticNavigatorProps) => unknown;
|
|
449
|
+
/** Renders `decorator` in place of the navigator; it renders `Navigator`, whose props merge into the config. */
|
|
450
|
+
with(decorator: (props: { Navigator: (props: StaticNavigatorProps) => unknown }) => Node): { config: Config; getComponent(): (props: {}) => unknown };
|
|
451
|
+
};
|
|
452
|
+
/** One screen of a static configuration, typed on its own. */
|
|
453
|
+
export function createNativeStackScreen<S extends StaticScreenConfig & { screen: ((props: never) => unknown) | { config: object } }>(config: S): S;
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Portal uses the caller’s providers and the ordinary foreground Back chain; it does not create a route or hash entry. Its canonical UI declaration is:
|
|
458
|
+
```text
|
|
459
|
+
export const Portal: (props: { open: boolean; onClose?: () => void; children?: CatalogChildren }) => ReactNode;
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## Index
|
|
463
|
+
|
|
464
|
+
- View — Closed primitive contract shared by the native and DOM backends.
|
|
465
|
+
- Text — Closed primitive contract shared by the native and DOM backends.
|
|
466
|
+
- Pressable — Closed primitive contract shared by the native and DOM backends.
|
|
467
|
+
- Button — Closed primitive contract shared by the native and DOM backends.
|
|
468
|
+
- TouchableOpacity — Closed primitive contract shared by the native and DOM backends.
|
|
469
|
+
- Image — Closed primitive contract shared by the native and DOM backends.
|
|
470
|
+
- ScrollView — Closed primitive contract shared by the native and DOM backends.
|
|
471
|
+
- ViewportOffsetScope — Closed primitive contract shared by the native and DOM backends.
|
|
472
|
+
- FlashList — Closed primitive contract shared by the native and DOM backends.
|
|
473
|
+
- SectionList — Public block props and rendering callbacks.
|
|
474
|
+
- Carousel — Public block props and rendering callbacks.
|
|
475
|
+
- Chips — Public block props and rendering callbacks.
|
|
476
|
+
- TextInput — Closed primitive contract shared by the native and DOM backends.
|
|
477
|
+
- ActivityIndicator — Closed primitive contract shared by the native and DOM backends.
|
|
478
|
+
- LinearGradient — Closed primitive contract shared by the native and DOM backends.
|
|
479
|
+
- SafeAreaView — Closed primitive contract shared by the native and DOM backends.
|
|
480
|
+
- BlurView — Closed primitive contract shared by the native and DOM backends.
|
|
481
|
+
- CheckBox — Closed primitive contract shared by the native and DOM backends.
|
|
482
|
+
- KeyboardAvoidingView — Closed primitive contract shared by the native and DOM backends.
|
|
483
|
+
- Modal — Closed primitive contract shared by the native and DOM backends.
|
|
484
|
+
- SlidingText — Closed primitive contract shared by the native and DOM backends.
|
|
485
|
+
- Svg — Closed primitive contract shared by the native and DOM backends.
|
|
486
|
+
- Switch — Closed primitive contract shared by the native and DOM backends.
|
|
487
|
+
- Slider — Closed primitive contract shared by the native and DOM backends.
|
|
488
|
+
- Skeleton — Closed primitive contract shared by the native and DOM backends.
|
|
489
|
+
- WebView — Closed primitive contract shared by the native and DOM backends.
|
|
490
|
+
- RefreshControl — Closed primitive contract shared by the native and DOM backends.
|
|
491
|
+
- VideoPlayer — VideoPlayer composite component.
|
|
492
|
+
- VideoView — Shows a player: `const player = useVideoPlayer(source)`, then `<VideoView player={player} />`. The view takes no remote keys; the app maps them with `useTVEventHandler` and calls `player.togglePlay()` etc.
|
|
493
|
+
- VideoThumbnail — One scrub frame from the source's thumbnails: `<VideoThumbnail player={player} offset={-10} style={…} />`. Shows the frame `offset` seconds from the scrub position, cropped to `style`'s size; nothing when the media has no thumbnails.
|
|
494
|
+
- ScrubThumbnail — A frame that rides above the seekbar at the scrub position while scrubbing; show the time yourself (`player.elapsedText`). Lay it over the track's width, just above it: `<ScrubThumbnail player={player} style={{ position: 'absolute', left: 0, right: 0, bottom: 24 }} />`.
|
|
495
|
+
- ScrubFilmstrip — A row of `count` scrub frames one scrub tap (`scrub.step`, 10 s by default) apart, centred on the scrub position and enlarged there, shown while scrubbing. Place it full width above the seekbar: `<ScrubFilmstrip player={player} count={5} style={…} />`.
|
|
496
|
+
- SlickTile — SlickTile composite component.
|
|
497
|
+
- ProgressTile — ProgressTile — Continue Watching tile with a progress bar and focus play icon. Best for "Continue Watching" and "Up Next" rows.
|
|
498
|
+
- VideoTile — Focus-preview tile: poster at rest, crossfading to a muted looping clip on focus.
|
|
499
|
+
- SpotlightTile — Detail-on-focus reveal tile: small title at rest, centered detail overlay on focus.
|
|
500
|
+
- PosterTile — PosterTile — clean portrait card with a metadata block below the image. Best for dense content grids, search results and browse-by-genre rows.
|
|
501
|
+
- ThumbTile — ThumbTile — 16:9 thumbnail with a duration badge and a metadata block below. Best for extras, trailers, behind-the-scenes and clips.
|
|
502
|
+
- RankTile — RankTile — Top 10 style tile with a watermark rank number and a corner badge. Best for "Top 10 in Your Country" and trending lists.
|
|
503
|
+
- MorphTile — Expanding browse card: a portrait poster that widens on focus and reveals a detail panel.
|
|
504
|
+
- StackTile — StackTile — collection tile whose three layered posters fan out on focus. Uses `images` (plural) instead of `image` from BaseTileProps.
|
|
505
|
+
- BillboardHero — BillboardHero — Netflix-style full-bleed cinematic hero. Portrait centres the content; landscape left-aligns it with synopsis and action buttons.
|
|
506
|
+
- TVKeyboard — On-screen TV keyboard: pass it as a TextInput's tvKeyboard prop (bottom, side, full) or place variant "search" inline beside results.
|
|
507
|
+
- CinematicHero — CinematicHero — Disney+/Apple TV+ center-focused hero. A thumbnail strip replaces the pagination dots for slide navigation.
|
|
508
|
+
- GalleryHero — GalleryHero — Apple TV+ cover flow multi-card carousel. Adjacent cards take a 3D perspective rotation, reduced scale and opacity; always slides.
|
|
509
|
+
- TrailerHero — TrailerHero — video-first hero with auto-playing trailers and a sound toggle. Portrait splits video over an info panel; landscape is full-bleed with a floating info bar.
|
|
510
|
+
- Icon — Closed primitive contract shared by the native and DOM backends.
|
|
511
|
+
- FocusGroup — Groups focusables so arrow keys move between them along one axis.
|
|
512
|
+
- Screen — The focus boundary every screen's content sits in; wrap each registered screen's content in one.
|
|
513
|
+
|
|
514
|
+
## View
|
|
515
|
+
|
|
516
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
517
|
+
|
|
518
|
+
### Props
|
|
519
|
+
|
|
520
|
+
- `style?: ViewStyleProp | undefined`
|
|
521
|
+
- `children?: React.ReactNode | undefined`
|
|
522
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
523
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
524
|
+
- `testID?: string | undefined`
|
|
525
|
+
- `nativeID?: string | undefined`
|
|
526
|
+
- `accessible?: boolean | undefined`
|
|
527
|
+
- `accessibilityLabel?: string | undefined`
|
|
528
|
+
- `accessibilityHint?: string | undefined`
|
|
529
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
530
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
531
|
+
|
|
532
|
+
## Text
|
|
533
|
+
|
|
534
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
535
|
+
|
|
536
|
+
### Props
|
|
537
|
+
|
|
538
|
+
- `style?: StyleProp<TextStyle>`
|
|
539
|
+
- `numberOfLines?: number`
|
|
540
|
+
- `ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip'`
|
|
541
|
+
- `selectable?: boolean`
|
|
542
|
+
- `adjustsFontSizeToFit?: boolean`
|
|
543
|
+
- `minimumFontScale?: number`
|
|
544
|
+
- `allowFontScaling?: boolean`
|
|
545
|
+
- `maxFontSizeMultiplier?: number | null`
|
|
546
|
+
- `onPress?: ((event: GestureResponderEvent | null) => void)`
|
|
547
|
+
- `children?: React.ReactNode | undefined`
|
|
548
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
549
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
550
|
+
- `testID?: string | undefined`
|
|
551
|
+
- `nativeID?: string | undefined`
|
|
552
|
+
- `accessible?: boolean | undefined`
|
|
553
|
+
- `accessibilityLabel?: string | undefined`
|
|
554
|
+
- `accessibilityHint?: string | undefined`
|
|
555
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
556
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
557
|
+
|
|
558
|
+
## Pressable
|
|
559
|
+
|
|
560
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
561
|
+
|
|
562
|
+
### Props
|
|
563
|
+
|
|
564
|
+
- `style?: StyleProp<ViewStyle> | ((state: PressableState) => StyleProp<ViewStyle>)`
|
|
565
|
+
- `children?: ReactNode | ((state: PressableState) => ReactNode)`
|
|
566
|
+
- `onPress?: ((event: GestureResponderEvent | null) => void)`
|
|
567
|
+
- `onLongPress?: ((event: GestureResponderEvent | null) => void)`
|
|
568
|
+
- `onPressIn?: ((event: GestureResponderEvent | null) => void)`
|
|
569
|
+
- `onPressOut?: ((event: GestureResponderEvent | null) => void)`
|
|
570
|
+
- `onFocus?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
571
|
+
- `onBlur?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
572
|
+
- `disabled?: boolean`
|
|
573
|
+
- `focusKey?: string`
|
|
574
|
+
- `focusAnimation?: FocusAnimationConfig`
|
|
575
|
+
- `focusable?: boolean`
|
|
576
|
+
- `hasTVPreferredFocus?: boolean`
|
|
577
|
+
- `delayLongPress?: number`
|
|
578
|
+
- `onHoverIn?: ((event: MouseEvent) => void)`
|
|
579
|
+
- `onHoverOut?: ((event: MouseEvent) => void)`
|
|
580
|
+
- `android_ripple?: PressableAndroidRippleConfig | null`
|
|
581
|
+
- `pressRetentionOffset?: Insets | number | null`
|
|
582
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
583
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
584
|
+
- `testID?: string | undefined`
|
|
585
|
+
- `nativeID?: string | undefined`
|
|
586
|
+
- `accessible?: boolean | undefined`
|
|
587
|
+
- `accessibilityLabel?: string | undefined`
|
|
588
|
+
- `accessibilityHint?: string | undefined`
|
|
589
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
590
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
591
|
+
|
|
592
|
+
## Button
|
|
593
|
+
|
|
594
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
595
|
+
|
|
596
|
+
### Props
|
|
597
|
+
|
|
598
|
+
- `title?: string`
|
|
599
|
+
- `variant?: 'primary' | 'secondary' | 'ghost'`
|
|
600
|
+
- `style?: import('react-native').StyleProp<import('react-native').ViewStyle>`
|
|
601
|
+
- `children?: import('react').ReactNode`
|
|
602
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
603
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
604
|
+
- `testID?: string | undefined`
|
|
605
|
+
- `nativeID?: string | undefined`
|
|
606
|
+
- `accessible?: boolean | undefined`
|
|
607
|
+
- `accessibilityLabel?: string | undefined`
|
|
608
|
+
- `accessibilityHint?: string | undefined`
|
|
609
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
610
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
611
|
+
- `onBlur?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
612
|
+
- `onFocus?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
613
|
+
- `focusable?: boolean`
|
|
614
|
+
- `hasTVPreferredFocus?: boolean`
|
|
615
|
+
- `onPressIn?: ((event: GestureResponderEvent | null) => void)`
|
|
616
|
+
- `onPressOut?: ((event: GestureResponderEvent | null) => void)`
|
|
617
|
+
- `onPress?: ((event: GestureResponderEvent | null) => void)`
|
|
618
|
+
- `onLongPress?: ((event: GestureResponderEvent | null) => void)`
|
|
619
|
+
- `disabled?: boolean`
|
|
620
|
+
- `focusKey?: string`
|
|
621
|
+
- `focusAnimation?: FocusAnimationConfig`
|
|
622
|
+
- `delayLongPress?: number`
|
|
623
|
+
- `onHoverIn?: ((event: MouseEvent) => void)`
|
|
624
|
+
- `onHoverOut?: ((event: MouseEvent) => void)`
|
|
625
|
+
- `android_ripple?: PressableAndroidRippleConfig | null`
|
|
626
|
+
- `pressRetentionOffset?: Insets | number | null`
|
|
627
|
+
|
|
628
|
+
## TouchableOpacity
|
|
629
|
+
|
|
630
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
631
|
+
|
|
632
|
+
### Props
|
|
633
|
+
|
|
634
|
+
- `activeOpacity?: number`
|
|
635
|
+
- `style?: StyleProp<ViewStyle> | ((state: PressableState) => StyleProp<ViewStyle>)`
|
|
636
|
+
- `children?: ReactNode | ((state: PressableState) => ReactNode)`
|
|
637
|
+
- `onPress?: ((event: GestureResponderEvent | null) => void)`
|
|
638
|
+
- `onLongPress?: ((event: GestureResponderEvent | null) => void)`
|
|
639
|
+
- `onPressIn?: ((event: GestureResponderEvent | null) => void)`
|
|
640
|
+
- `onPressOut?: ((event: GestureResponderEvent | null) => void)`
|
|
641
|
+
- `onFocus?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
642
|
+
- `onBlur?: ((event: NativeSyntheticEvent<TargetedEvent> | null) => void)`
|
|
643
|
+
- `disabled?: boolean`
|
|
644
|
+
- `focusKey?: string`
|
|
645
|
+
- `focusAnimation?: FocusAnimationConfig`
|
|
646
|
+
- `focusable?: boolean`
|
|
647
|
+
- `hasTVPreferredFocus?: boolean`
|
|
648
|
+
- `delayLongPress?: number`
|
|
649
|
+
- `onHoverIn?: ((event: MouseEvent) => void)`
|
|
650
|
+
- `onHoverOut?: ((event: MouseEvent) => void)`
|
|
651
|
+
- `android_ripple?: PressableAndroidRippleConfig | null`
|
|
652
|
+
- `pressRetentionOffset?: Insets | number | null`
|
|
653
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
654
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
655
|
+
- `testID?: string | undefined`
|
|
656
|
+
- `nativeID?: string | undefined`
|
|
657
|
+
- `accessible?: boolean | undefined`
|
|
658
|
+
- `accessibilityLabel?: string | undefined`
|
|
659
|
+
- `accessibilityHint?: string | undefined`
|
|
660
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
661
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
662
|
+
|
|
663
|
+
## Image
|
|
664
|
+
|
|
665
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
666
|
+
|
|
667
|
+
### Props
|
|
668
|
+
|
|
669
|
+
- `source?: string | { uri: string } | null`
|
|
670
|
+
- `resizeMode?: Exclude<ImageResizeMode, 'repeat'>`
|
|
671
|
+
- `src?: string`
|
|
672
|
+
- `alt?: string`
|
|
673
|
+
- `defaultSource?: string | { uri: string } | null`
|
|
674
|
+
- `fadeDuration?: number`
|
|
675
|
+
- `tintColor?: string`
|
|
676
|
+
- `width?: number`
|
|
677
|
+
- `height?: number`
|
|
678
|
+
- `borderRadius?: number`
|
|
679
|
+
- `style?: StyleProp<RNImageStyle & {
|
|
680
|
+
/**
|
|
681
|
+
* Specifies stroke weight for SF symbols.
|
|
682
|
+
* @platform ios
|
|
683
|
+
*/
|
|
684
|
+
fontWeight?: TextStyle['fontWeight'];
|
|
685
|
+
/**
|
|
686
|
+
* Sets the tint color of SF symbols. This is an alias for `tintColor` that can be used in styles.
|
|
687
|
+
* @platform ios
|
|
688
|
+
*/
|
|
689
|
+
color?: TextStyle['color'];
|
|
690
|
+
/**
|
|
691
|
+
* Sets the size (width and height) of SF symbols.
|
|
692
|
+
* @platform ios
|
|
693
|
+
*/
|
|
694
|
+
fontSize?: TextStyle['fontSize'];
|
|
695
|
+
}>`
|
|
696
|
+
- `testID?: string | undefined`
|
|
697
|
+
- `accessibilityLabel?: string`
|
|
698
|
+
- `contentFit?: ImageContentFit`
|
|
699
|
+
- `blurRadius?: number`
|
|
700
|
+
- `onLoad?: (event: ImageLoadEventData) => void`
|
|
701
|
+
- `onLoadStart?: () => void`
|
|
702
|
+
- `onLoadEnd?: () => void`
|
|
703
|
+
- `onError?: (event: ImageErrorEventData) => void`
|
|
704
|
+
|
|
705
|
+
## ScrollView
|
|
706
|
+
|
|
707
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
708
|
+
|
|
709
|
+
### Props
|
|
710
|
+
|
|
711
|
+
- `keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled'`
|
|
712
|
+
- `contentContainerStyle?: StyleProp<ViewStyle>`
|
|
713
|
+
- `horizontal?: boolean`
|
|
714
|
+
- `scrollEnabled?: boolean`
|
|
715
|
+
- `viewportOffset?: number`
|
|
716
|
+
- `scrollPaddingTop?: number`
|
|
717
|
+
- `showsHorizontalScrollIndicator?: boolean`
|
|
718
|
+
- `showsVerticalScrollIndicator?: boolean`
|
|
719
|
+
- `onScroll?: ((event: NativeSyntheticEvent<NativeScrollEvent>) => void)`
|
|
720
|
+
- `style?: ViewStyleProp | undefined`
|
|
721
|
+
- `children?: React.ReactNode | undefined`
|
|
722
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
723
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
724
|
+
- `testID?: string | undefined`
|
|
725
|
+
- `nativeID?: string | undefined`
|
|
726
|
+
- `accessible?: boolean | undefined`
|
|
727
|
+
- `accessibilityLabel?: string | undefined`
|
|
728
|
+
- `accessibilityHint?: string | undefined`
|
|
729
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
730
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
731
|
+
- `pagingEnabled?: boolean | undefined`
|
|
732
|
+
- `snapToInterval?: number | undefined`
|
|
733
|
+
- `snapToAlignment?: ("start" | "center" | "end" | "item") | undefined`
|
|
734
|
+
- `snapToOffsets?: ReadonlyArray<number> | undefined`
|
|
735
|
+
- `decelerationRate?: DecelerationRateType | undefined`
|
|
736
|
+
- `keyboardDismissMode?: ("none" | "on-drag" | "interactive") | undefined`
|
|
737
|
+
- `stickyHeaderIndices?: ReadonlyArray<number> | undefined`
|
|
738
|
+
- `bounces?: boolean | undefined`
|
|
739
|
+
- `nestedScrollEnabled?: boolean | undefined`
|
|
740
|
+
- `maintainVisibleContentPosition?: Readonly<{
|
|
741
|
+
minIndexForVisible: number;
|
|
742
|
+
autoscrollToTopThreshold?: number | undefined;
|
|
743
|
+
}> | undefined`
|
|
744
|
+
- `onMomentumScrollEnd?: ((event: ScrollEvent) => void) | undefined`
|
|
745
|
+
- `onScrollBeginDrag?: ((event: ScrollEvent) => void) | undefined`
|
|
746
|
+
- `onScrollEndDrag?: ((event: ScrollEvent) => void) | undefined`
|
|
747
|
+
- `scrollEventThrottle?: number | undefined`
|
|
748
|
+
- `onContentSizeChange?: ((contentWidth: number, contentHeight: number) => void) | undefined`
|
|
749
|
+
- `minimumZoomScale?: number | undefined`
|
|
750
|
+
- `maximumZoomScale?: number | undefined`
|
|
751
|
+
- `pinchGestureEnabled?: boolean | undefined`
|
|
752
|
+
- `zoomScale?: number | undefined`
|
|
753
|
+
|
|
754
|
+
## ViewportOffsetScope
|
|
755
|
+
|
|
756
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
757
|
+
|
|
758
|
+
### Props
|
|
759
|
+
|
|
760
|
+
- `viewportOffset: number`
|
|
761
|
+
- `children?: ReactNode`
|
|
762
|
+
|
|
763
|
+
## FlashList
|
|
764
|
+
|
|
765
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
766
|
+
|
|
767
|
+
### Props
|
|
768
|
+
|
|
769
|
+
- `data?: readonly T[] | null`
|
|
770
|
+
- `renderItem?: ((info: { item: T; index: number }) => ReactNode)`
|
|
771
|
+
- `keyExtractor?: ((item: T, index: number) => string)`
|
|
772
|
+
- `children?: ReactNode | ((item: T) => ReactNode)`
|
|
773
|
+
- `numColumns?: number`
|
|
774
|
+
- `gap?: number`
|
|
775
|
+
- `rowGap?: number`
|
|
776
|
+
- `columnGap?: number`
|
|
777
|
+
- `contentContainerStyle?: StyleProp<ViewStyle>`
|
|
778
|
+
- `estimatedItemSize?: number`
|
|
779
|
+
- `perfConfig?: ListPerfConfig`
|
|
780
|
+
- `focusEntry?: 'remember' | 'first'`
|
|
781
|
+
- `focusScale?: number`
|
|
782
|
+
- `viewportOffset?: number`
|
|
783
|
+
- `scrollPaddingStart?: number`
|
|
784
|
+
- `ListEmptyComponent?: ComponentType | ReactElement | null`
|
|
785
|
+
- `ListHeaderComponent?: ComponentType | ReactElement | null`
|
|
786
|
+
- `ListFooterComponent?: ComponentType | ReactElement | null`
|
|
787
|
+
- `onEndReached?: (() => void)`
|
|
788
|
+
- `onEndReachedThreshold?: number`
|
|
789
|
+
- `showsHorizontalScrollIndicator?: boolean`
|
|
790
|
+
- `showsVerticalScrollIndicator?: boolean`
|
|
791
|
+
- `initialScrollIndex?: number`
|
|
792
|
+
- `horizontal?: boolean`
|
|
793
|
+
- `ItemSeparatorComponent?: ComponentType | ReactElement | null`
|
|
794
|
+
- `style?: ViewStyleProp | undefined`
|
|
795
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
796
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
797
|
+
- `testID?: string | undefined`
|
|
798
|
+
- `nativeID?: string | undefined`
|
|
799
|
+
- `accessible?: boolean | undefined`
|
|
800
|
+
- `accessibilityLabel?: string | undefined`
|
|
801
|
+
- `accessibilityHint?: string | undefined`
|
|
802
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
803
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
804
|
+
|
|
805
|
+
## SectionList
|
|
806
|
+
|
|
807
|
+
Public block props and rendering callbacks.
|
|
808
|
+
|
|
809
|
+
### Props
|
|
810
|
+
|
|
811
|
+
- `sections: ReadonlyArray<BlockSection<T>>`
|
|
812
|
+
- `itemKey: (item: T) => string` — Signature: item-string
|
|
813
|
+
- `renderItem: (info: SectionItemInfo<T>) => ReactNode` — Signature: item-info-node
|
|
814
|
+
- `renderSectionHeader?: (section: BlockSection<T>) => ReactNode` — Signature: section-node
|
|
815
|
+
- `style?: StyleProp<ViewStyle>`
|
|
816
|
+
- `contentContainerStyle?: StyleProp<ViewStyle>`
|
|
817
|
+
- `perfConfig?: { overscan?: number }`
|
|
818
|
+
- `focusEntry?: "remember" | "first"` — Default: "remember"
|
|
819
|
+
|
|
820
|
+
### Literal rules
|
|
821
|
+
|
|
822
|
+
- `E_BLOCK_OVERSCAN` — SectionList overscan must be finite and nonnegative. Constraint: `{"kind":"finiteMin","path":["perfConfig","overscan"],"min":0}`
|
|
823
|
+
|
|
824
|
+
## Carousel
|
|
825
|
+
|
|
826
|
+
Public block props and rendering callbacks.
|
|
827
|
+
|
|
828
|
+
### Props
|
|
829
|
+
|
|
830
|
+
- `data: ReadonlyArray<T>`
|
|
831
|
+
- `itemKey: (item: T) => string` — Signature: item-string
|
|
832
|
+
- `renderItem: (info: BlockItemInfo<T>) => ReactNode` — Signature: item-info-node
|
|
833
|
+
- `style?: StyleProp<ViewStyle>`
|
|
834
|
+
- `contentContainerStyle?: StyleProp<ViewStyle>`
|
|
835
|
+
- `focusEntry?: "remember" | "first"` — Default: "remember"
|
|
836
|
+
- `onActiveIndexChange?: (index: number) => void` — Called with the settled item index when it changes. — Signature: index-void
|
|
837
|
+
- `loop?: boolean` — Wrap from the last item back to the first. — Default: false
|
|
838
|
+
- `autoFillData?: boolean` — Repeat one or two looping items so the loop has neighbours. — Default: true
|
|
839
|
+
- `mode?: "parallax" | "horizontal-stack" | "vertical-stack"` — Item transition; omitted slides items side by side.
|
|
840
|
+
- `modeConfig?: { parallaxScrollingOffset?: number; parallaxScrollingScale?: number; parallaxAdjacentItemScale?: number; showLength?: number; moveSize?: number; stackInterval?: number; scaleInterval?: number; opacityInterval?: number; rotateZDeg?: number; snapDirection?: "left" | "right" }` — Settings for the chosen mode; distances are canvas units.
|
|
841
|
+
- `width?: number` — Item width in canvas units; defaults to the carousel width.
|
|
842
|
+
- `height?: number` — Item height in canvas units; defaults to the tallest item, or the carousel height when vertical.
|
|
843
|
+
- `vertical?: boolean` — Page up and down instead of left and right. — Default: false
|
|
844
|
+
- `pagingEnabled?: boolean` — Stop on one item per swipe. — Default: true
|
|
845
|
+
- `snapEnabled?: boolean` — Settle on the nearest item when paging is off. — Default: true
|
|
846
|
+
- `overscrollEnabled?: boolean` — Allow dragging past the first and last items. — Default: true
|
|
847
|
+
- `enabled?: boolean` — Respond to swipes. — Default: true
|
|
848
|
+
- `autoPlay?: boolean` — Advance on a timer. — Default: false
|
|
849
|
+
- `autoPlayReverse?: boolean` — Auto-play backwards. — Default: false
|
|
850
|
+
- `autoPlayInterval?: number` — Milliseconds between auto-play steps. — Default: 1000
|
|
851
|
+
- `defaultIndex?: number` — Index shown first. — Default: 0
|
|
852
|
+
- `scrollAnimationDuration?: number` — Milliseconds a programmatic or snapped scroll takes. — Default: 500
|
|
853
|
+
- `windowSize?: number` — Items rendered around the current one; all by default.
|
|
854
|
+
- `minScrollDistancePerSwipe?: number` — Shortest swipe, in canvas units, that moves the carousel.
|
|
855
|
+
- `maxScrollDistancePerSwipe?: number` — Longest distance, in canvas units, one swipe can move.
|
|
856
|
+
- `fixedDirection?: "positive" | "negative"` — Always scroll this way, whichever way the swipe goes.
|
|
857
|
+
- `customAnimation?: (value: number, index: number) => ViewStyle` — A 'worklet' function styling each item from its offset to the current one (-1, 0, 1) and its index; replaces mode. — Signature: offset-index-style
|
|
858
|
+
- `ref?: { current: CarouselRef | null }` — A useRef<CarouselRef> handle: next, prev, scrollTo and getCurrentIndex. — Signature: carousel
|
|
859
|
+
- `pagination?: boolean | { dotSize?: number; gap?: number; color?: string; activeColor?: string; position?: "bottom" | "top" | "left" | "right"; overlay?: boolean }` — Dot row that pages the carousel: on when there is more than one item; an object styles it (colours default to theme.colors.primary and textMuted, position to bottom, or right when vertical).
|
|
860
|
+
- `focusMode?: "content" | "card"` — TV focus: 'content' reaches only the centred card's controls and the dots page; 'card' makes each card one focus stop that the carousel follows. — Default: "content"
|
|
861
|
+
- `onSnapToItem?: (index: number) => void` — Called with the item index each time a scroll settles. — Signature: index-void
|
|
862
|
+
- `onScrollStart?: () => void` — Called when a swipe or programmatic scroll starts. — Signature: void
|
|
863
|
+
- `onScrollEnd?: (index: number) => void` — Called with the item index when a scroll ends. — Signature: index-void
|
|
864
|
+
- `onProgressChange?: (offsetProgress: number, absoluteProgress: number) => void` — Called while scrolling with the offset distance and the fractional item position. — Signature: progress-void
|
|
865
|
+
|
|
866
|
+
## Chips
|
|
867
|
+
|
|
868
|
+
Public block props and rendering callbacks.
|
|
869
|
+
|
|
870
|
+
### Props
|
|
871
|
+
|
|
872
|
+
- `data: ReadonlyArray<T>`
|
|
873
|
+
- `itemKey: (item: T) => string` — Signature: item-string
|
|
874
|
+
- `renderItem: (info: ChipsItemInfo<T>) => ReactNode` — Signature: chips-item-info-node
|
|
875
|
+
- `selectedKey?: string`
|
|
876
|
+
- `onSelect: (item: T) => void` — Signature: item-void
|
|
877
|
+
- `style?: StyleProp<ViewStyle>`
|
|
878
|
+
- `contentContainerStyle?: StyleProp<ViewStyle>`
|
|
879
|
+
- `perfConfig?: { overscan?: number }`
|
|
880
|
+
- `focusEntry?: "remember" | "first"` — Default: "remember"
|
|
881
|
+
|
|
882
|
+
### Literal rules
|
|
883
|
+
|
|
884
|
+
- `E_BLOCK_OVERSCAN` — Chips overscan must be finite and nonnegative. Constraint: `{"kind":"finiteMin","path":["perfConfig","overscan"],"min":0}`
|
|
885
|
+
|
|
886
|
+
## TextInput
|
|
887
|
+
|
|
888
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
889
|
+
|
|
890
|
+
### Props
|
|
891
|
+
|
|
892
|
+
- `testID?: string | undefined`
|
|
893
|
+
- `nativeID?: string | undefined`
|
|
894
|
+
- `accessibilityLabel?: string | undefined`
|
|
895
|
+
- `accessibilityHint?: string | undefined`
|
|
896
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
897
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
898
|
+
- `onBlur?: ((e: TextInputBlurEvent) => unknown) | undefined`
|
|
899
|
+
- `onFocus?: ((e: TextInputFocusEvent) => unknown) | undefined`
|
|
900
|
+
- `autoFocus?: boolean | undefined`
|
|
901
|
+
- `onPress?: ((event: GestureResponderEvent) => unknown) | undefined`
|
|
902
|
+
- `value?: string | undefined`
|
|
903
|
+
- `defaultValue?: string | undefined`
|
|
904
|
+
- `onChangeText?: ((text: string) => unknown) | undefined`
|
|
905
|
+
- `multiline?: boolean | undefined`
|
|
906
|
+
- `numberOfLines?: number | undefined`
|
|
907
|
+
- `editable?: boolean | undefined`
|
|
908
|
+
- `placeholder?: string | undefined`
|
|
909
|
+
- `placeholderTextColor?: ColorValue | undefined`
|
|
910
|
+
- `secureTextEntry?: boolean | undefined`
|
|
911
|
+
- `allowFontScaling?: boolean | undefined`
|
|
912
|
+
- `maxFontSizeMultiplier?: number | undefined`
|
|
913
|
+
- `autoCapitalize?: AutoCapitalize | undefined`
|
|
914
|
+
- `autoCorrect?: boolean | undefined`
|
|
915
|
+
- `maxLength?: number | undefined`
|
|
916
|
+
- `autoComplete?: ("2fa-app-otp" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "email-otp" | "flight-confirmation-code" | "flight-number" | "family-name" | "gender" | "gift-card-number" | "gift-card-pin" | "given-name" | "honorific-prefix" | "honorific-suffix" | "loyalty-account-number" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-dependent-locality" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-address-unit" | "postal-code" | "promo-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "upi-vpa" | "url" | "wifi-password" | "username" | "username-new" | "off") | undefined`
|
|
917
|
+
- `textContentType?: TextContentType | undefined`
|
|
918
|
+
- `inputMode?: InputModeOptions | undefined`
|
|
919
|
+
- `enterKeyHint?: EnterKeyHintTypeOptions | undefined`
|
|
920
|
+
- `readOnly?: boolean | undefined`
|
|
921
|
+
- `selectTextOnFocus?: boolean | undefined`
|
|
922
|
+
- `clearTextOnFocus?: boolean | undefined`
|
|
923
|
+
- `spellCheck?: boolean | undefined`
|
|
924
|
+
- `textAlign?: ("left" | "center" | "right" | "start" | "end") | undefined`
|
|
925
|
+
- `submitBehavior?: SubmitBehavior | undefined`
|
|
926
|
+
- `onEndEditing?: ((e: TextInputEndEditingEvent) => unknown) | undefined`
|
|
927
|
+
- `selectionColor?: ColorValue | undefined`
|
|
928
|
+
- `cursorColor?: ColorValue | undefined`
|
|
929
|
+
- `keyboardAppearance?: ("default" | "light" | "dark") | undefined`
|
|
930
|
+
- `passwordRules?: PasswordRules | undefined`
|
|
931
|
+
- `dataDetectorTypes?: (DataDetectorTypesType | undefined) | ReadonlyArray<DataDetectorTypesType> | undefined`
|
|
932
|
+
- `inputAccessoryViewID?: string | undefined`
|
|
933
|
+
- `inputAccessoryViewButtonLabel?: string | undefined`
|
|
934
|
+
- `smartInsertDelete?: boolean | undefined`
|
|
935
|
+
- `lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined`
|
|
936
|
+
- `selection?: Readonly<{
|
|
937
|
+
start: number;
|
|
938
|
+
end?: number | undefined;
|
|
939
|
+
}> | undefined`
|
|
940
|
+
- `onSelectionChange?: ((e: TextInputSelectionChangeEvent) => unknown) | undefined`
|
|
941
|
+
- `onKeyPress?: ((e: TextInputKeyPressEvent) => unknown) | undefined`
|
|
942
|
+
- `keyboardType?: KeyboardTypeOptions | undefined`
|
|
943
|
+
- `returnKeyType?: ReturnKeyTypeOptions | undefined`
|
|
944
|
+
- `onSubmitEditing?: ((e: TextInputSubmitEditingEvent) => unknown) | undefined`
|
|
945
|
+
- `showSoftInputOnFocus?: boolean | undefined`
|
|
946
|
+
- `caretHidden?: boolean | undefined`
|
|
947
|
+
- `style?: StyleProp<TextStyle> | ((state: TextInputStyleState) => StyleProp<TextStyle>)`
|
|
948
|
+
- `focusKey?: string`
|
|
949
|
+
- `tvKeyboard?: ReactNode | (() => ReactNode)`
|
|
950
|
+
|
|
951
|
+
## ActivityIndicator
|
|
952
|
+
|
|
953
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
954
|
+
|
|
955
|
+
### Props
|
|
956
|
+
|
|
957
|
+
- `style?: ViewStyleProp | undefined`
|
|
958
|
+
- `testID?: string | undefined`
|
|
959
|
+
- `accessibilityLabel?: string | undefined`
|
|
960
|
+
- `color?: ColorValue | undefined`
|
|
961
|
+
- `size?: IndicatorSize | undefined`
|
|
962
|
+
- `animating?: boolean | undefined`
|
|
963
|
+
- `hidesWhenStopped?: boolean | undefined`
|
|
964
|
+
|
|
965
|
+
## LinearGradient
|
|
966
|
+
|
|
967
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
968
|
+
|
|
969
|
+
### Props
|
|
970
|
+
|
|
971
|
+
- `colors: readonly [ColorValue, ColorValue, ...ColorValue[]]`
|
|
972
|
+
- `start?: { x: number; y: number }`
|
|
973
|
+
- `end?: { x: number; y: number }`
|
|
974
|
+
- `locations?: readonly [number, number, ...number[]]`
|
|
975
|
+
- `style?: ViewStyleProp | undefined`
|
|
976
|
+
- `children?: React.ReactNode | undefined`
|
|
977
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
978
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
979
|
+
- `testID?: string | undefined`
|
|
980
|
+
- `nativeID?: string | undefined`
|
|
981
|
+
- `accessible?: boolean | undefined`
|
|
982
|
+
- `accessibilityLabel?: string | undefined`
|
|
983
|
+
- `accessibilityHint?: string | undefined`
|
|
984
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
985
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
986
|
+
|
|
987
|
+
## SafeAreaView
|
|
988
|
+
|
|
989
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
990
|
+
|
|
991
|
+
### Props
|
|
992
|
+
|
|
993
|
+
- `style?: ViewStyleProp | undefined`
|
|
994
|
+
- `children?: React.ReactNode | undefined`
|
|
995
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
996
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
997
|
+
- `testID?: string | undefined`
|
|
998
|
+
- `nativeID?: string | undefined`
|
|
999
|
+
- `accessible?: boolean | undefined`
|
|
1000
|
+
- `accessibilityLabel?: string | undefined`
|
|
1001
|
+
- `accessibilityHint?: string | undefined`
|
|
1002
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1003
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1004
|
+
- `edges?: readonly SafeAreaEdge[]`
|
|
1005
|
+
- `mode?: 'padding' | 'margin'`
|
|
1006
|
+
|
|
1007
|
+
## BlurView
|
|
1008
|
+
|
|
1009
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1010
|
+
|
|
1011
|
+
### Props
|
|
1012
|
+
|
|
1013
|
+
- `blurAmount?: number`
|
|
1014
|
+
- `style?: ViewStyleProp | undefined`
|
|
1015
|
+
- `children?: React.ReactNode | undefined`
|
|
1016
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1017
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1018
|
+
- `testID?: string | undefined`
|
|
1019
|
+
- `nativeID?: string | undefined`
|
|
1020
|
+
- `accessible?: boolean | undefined`
|
|
1021
|
+
- `accessibilityLabel?: string | undefined`
|
|
1022
|
+
- `accessibilityHint?: string | undefined`
|
|
1023
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1024
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1025
|
+
|
|
1026
|
+
## CheckBox
|
|
1027
|
+
|
|
1028
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1029
|
+
|
|
1030
|
+
### Props
|
|
1031
|
+
|
|
1032
|
+
- `value?: boolean`
|
|
1033
|
+
- `onValueChange?: ((value: boolean) => void)`
|
|
1034
|
+
- `disabled?: boolean`
|
|
1035
|
+
- `color?: string`
|
|
1036
|
+
- `style?: ViewStyleProp | undefined`
|
|
1037
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1038
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1039
|
+
- `testID?: string | undefined`
|
|
1040
|
+
- `nativeID?: string | undefined`
|
|
1041
|
+
- `accessible?: boolean | undefined`
|
|
1042
|
+
- `accessibilityLabel?: string | undefined`
|
|
1043
|
+
- `accessibilityHint?: string | undefined`
|
|
1044
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1045
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1046
|
+
|
|
1047
|
+
## KeyboardAvoidingView
|
|
1048
|
+
|
|
1049
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1050
|
+
|
|
1051
|
+
### Props
|
|
1052
|
+
|
|
1053
|
+
- `style?: ViewStyleProp | undefined`
|
|
1054
|
+
- `children?: React.ReactNode | undefined`
|
|
1055
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1056
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1057
|
+
- `testID?: string | undefined`
|
|
1058
|
+
- `nativeID?: string | undefined`
|
|
1059
|
+
- `accessible?: boolean | undefined`
|
|
1060
|
+
- `accessibilityLabel?: string | undefined`
|
|
1061
|
+
- `accessibilityHint?: string | undefined`
|
|
1062
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1063
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1064
|
+
- `enabled?: boolean | undefined`
|
|
1065
|
+
- `contentContainerStyle?: ViewStyleProp | undefined`
|
|
1066
|
+
- `behavior?: ("height" | "position" | "padding") | undefined`
|
|
1067
|
+
- `keyboardVerticalOffset?: number | undefined`
|
|
1068
|
+
|
|
1069
|
+
## Modal
|
|
1070
|
+
|
|
1071
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1072
|
+
|
|
1073
|
+
### Props
|
|
1074
|
+
|
|
1075
|
+
- `style?: ViewStyleProp | undefined`
|
|
1076
|
+
- `children?: React.ReactNode | undefined`
|
|
1077
|
+
- `testID?: string | undefined`
|
|
1078
|
+
- `presentationStyle?: ("fullScreen" | "pageSheet" | "formSheet" | "overFullScreen") | undefined`
|
|
1079
|
+
- `supportedOrientations?: ReadonlyArray<"portrait" | "portrait-upside-down" | "landscape" | "landscape-left" | "landscape-right"> | undefined`
|
|
1080
|
+
- `onDismiss?: (() => void) | undefined`
|
|
1081
|
+
- `allowSwipeDismissal?: boolean | undefined`
|
|
1082
|
+
- `statusBarTranslucent?: boolean | undefined`
|
|
1083
|
+
- `navigationBarTranslucent?: boolean | undefined`
|
|
1084
|
+
- `animationType?: ("none" | "slide" | "fade") | undefined`
|
|
1085
|
+
- `transparent?: boolean | undefined`
|
|
1086
|
+
- `visible?: boolean | undefined`
|
|
1087
|
+
- `onRequestClose?: DirectEventHandler<null> | undefined`
|
|
1088
|
+
- `onShow?: DirectEventHandler<null> | undefined`
|
|
1089
|
+
- `backdropColor?: ColorValue | undefined`
|
|
1090
|
+
|
|
1091
|
+
## SlidingText
|
|
1092
|
+
|
|
1093
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1094
|
+
|
|
1095
|
+
### Props
|
|
1096
|
+
|
|
1097
|
+
- `focused: boolean`
|
|
1098
|
+
- `duration?: number`
|
|
1099
|
+
- `marqueeDelay?: number`
|
|
1100
|
+
- `repeatSpacer?: number`
|
|
1101
|
+
- `animationType?: 'auto' | 'scroll' | 'bounce'`
|
|
1102
|
+
- `loop?: boolean`
|
|
1103
|
+
- `bounce?: boolean`
|
|
1104
|
+
- `marqueeOnMount?: boolean`
|
|
1105
|
+
- `disabled?: boolean`
|
|
1106
|
+
- `isRTL?: boolean`
|
|
1107
|
+
- `onMarqueeComplete?: (() => void)`
|
|
1108
|
+
- `onScrollStart?: (() => void)`
|
|
1109
|
+
- `style?: StyleProp<TextStyle>`
|
|
1110
|
+
- `children?: React.ReactNode | undefined`
|
|
1111
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1112
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1113
|
+
- `testID?: string | undefined`
|
|
1114
|
+
- `nativeID?: string | undefined`
|
|
1115
|
+
- `accessible?: boolean | undefined`
|
|
1116
|
+
- `accessibilityLabel?: string | undefined`
|
|
1117
|
+
- `accessibilityHint?: string | undefined`
|
|
1118
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1119
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1120
|
+
- `numberOfLines?: number`
|
|
1121
|
+
- `ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip'`
|
|
1122
|
+
|
|
1123
|
+
## Svg
|
|
1124
|
+
|
|
1125
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1126
|
+
|
|
1127
|
+
### Props
|
|
1128
|
+
|
|
1129
|
+
- `uri?: string | null`
|
|
1130
|
+
- `width?: number | string`
|
|
1131
|
+
- `height?: number | string`
|
|
1132
|
+
- `fill?: string`
|
|
1133
|
+
|
|
1134
|
+
## Switch
|
|
1135
|
+
|
|
1136
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1137
|
+
|
|
1138
|
+
### Props
|
|
1139
|
+
|
|
1140
|
+
- `style?: ViewStyleProp | undefined`
|
|
1141
|
+
- `testID?: string | undefined`
|
|
1142
|
+
- `accessibilityLabel?: string | undefined`
|
|
1143
|
+
- `disabled?: boolean | undefined`
|
|
1144
|
+
- `value?: boolean | undefined`
|
|
1145
|
+
- `onValueChange?: ((value: boolean) => Promise<void> | void) | undefined`
|
|
1146
|
+
- `trackColor?: Readonly<{
|
|
1147
|
+
false?: ColorValue | undefined;
|
|
1148
|
+
true?: ColorValue | undefined;
|
|
1149
|
+
}> | undefined`
|
|
1150
|
+
- `thumbColor?: ColorValue | undefined`
|
|
1151
|
+
- `ios_backgroundColor?: ColorValue | undefined`
|
|
1152
|
+
|
|
1153
|
+
## Slider
|
|
1154
|
+
|
|
1155
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1156
|
+
|
|
1157
|
+
### Props
|
|
1158
|
+
|
|
1159
|
+
- `value?: number`
|
|
1160
|
+
- `minimumValue?: number`
|
|
1161
|
+
- `maximumValue?: number`
|
|
1162
|
+
- `step?: number`
|
|
1163
|
+
- `disabled?: boolean`
|
|
1164
|
+
- `minimumTrackTintColor?: string`
|
|
1165
|
+
- `maximumTrackTintColor?: string`
|
|
1166
|
+
- `thumbTintColor?: string`
|
|
1167
|
+
- `onValueChange?: ((value: number) => void)`
|
|
1168
|
+
- `onSlidingComplete?: ((value: number) => void)`
|
|
1169
|
+
- `style?: ViewStyleProp | undefined`
|
|
1170
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1171
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1172
|
+
- `testID?: string | undefined`
|
|
1173
|
+
- `nativeID?: string | undefined`
|
|
1174
|
+
- `accessible?: boolean | undefined`
|
|
1175
|
+
- `accessibilityLabel?: string | undefined`
|
|
1176
|
+
- `accessibilityHint?: string | undefined`
|
|
1177
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1178
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1179
|
+
|
|
1180
|
+
## Skeleton
|
|
1181
|
+
|
|
1182
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1183
|
+
|
|
1184
|
+
### Props
|
|
1185
|
+
|
|
1186
|
+
- `width?: DimensionValue`
|
|
1187
|
+
- `height?: DimensionValue`
|
|
1188
|
+
- `borderRadius?: number`
|
|
1189
|
+
- `backgroundColor?: string`
|
|
1190
|
+
- `highlightColor?: string`
|
|
1191
|
+
- `style?: ViewStyleProp | undefined`
|
|
1192
|
+
- `pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined`
|
|
1193
|
+
- `onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined`
|
|
1194
|
+
- `testID?: string | undefined`
|
|
1195
|
+
- `nativeID?: string | undefined`
|
|
1196
|
+
- `accessible?: boolean | undefined`
|
|
1197
|
+
- `accessibilityLabel?: string | undefined`
|
|
1198
|
+
- `accessibilityHint?: string | undefined`
|
|
1199
|
+
- `accessibilityRole?: AccessibilityRole | undefined`
|
|
1200
|
+
- `accessibilityState?: AccessibilityState | undefined`
|
|
1201
|
+
|
|
1202
|
+
## WebView
|
|
1203
|
+
|
|
1204
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1205
|
+
|
|
1206
|
+
### Props
|
|
1207
|
+
|
|
1208
|
+
- `style?: any`
|
|
1209
|
+
- `testID?: string`
|
|
1210
|
+
- `onLoad?: () => void`
|
|
1211
|
+
- `onError?: () => void`
|
|
1212
|
+
- `scrollEnabled?: boolean`
|
|
1213
|
+
- `source?: WebViewSource`
|
|
1214
|
+
- `onMessage?: (event: { nativeEvent: { data: string } }) => void`
|
|
1215
|
+
|
|
1216
|
+
## RefreshControl
|
|
1217
|
+
|
|
1218
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1219
|
+
|
|
1220
|
+
### Props
|
|
1221
|
+
|
|
1222
|
+
- `style?: ViewStyleProp | undefined`
|
|
1223
|
+
- `testID?: string | undefined`
|
|
1224
|
+
- `accessibilityLabel?: string | undefined`
|
|
1225
|
+
- `enabled?: boolean | undefined`
|
|
1226
|
+
- `size?: ("default" | "large") | undefined`
|
|
1227
|
+
- `tintColor?: ColorValue | undefined`
|
|
1228
|
+
- `refreshing: boolean`
|
|
1229
|
+
- `onRefresh?: (() => void | Promise<void>) | undefined`
|
|
1230
|
+
- `colors?: ReadonlyArray<ColorValue> | undefined`
|
|
1231
|
+
- `progressBackgroundColor?: ColorValue | undefined`
|
|
1232
|
+
- `title?: string | undefined`
|
|
1233
|
+
- `titleColor?: ColorValue | undefined`
|
|
1234
|
+
- `progressViewOffset?: number | undefined`
|
|
1235
|
+
|
|
1236
|
+
## VideoPlayer
|
|
1237
|
+
|
|
1238
|
+
VideoPlayer composite component.
|
|
1239
|
+
|
|
1240
|
+
### Props
|
|
1241
|
+
|
|
1242
|
+
- `source: VideoSource`
|
|
1243
|
+
- `style?: StyleProp<ViewStyle>`
|
|
1244
|
+
- `paused?: boolean`
|
|
1245
|
+
- `muted?: boolean`
|
|
1246
|
+
- `loop?: boolean`
|
|
1247
|
+
- `volume?: number`
|
|
1248
|
+
- `rate?: number`
|
|
1249
|
+
- `resizeMode?: ResizeMode`
|
|
1250
|
+
- `onLoad?: (event: VideoLoadEvent) => void`
|
|
1251
|
+
- `onProgress?: (event: VideoProgressEvent) => void`
|
|
1252
|
+
- `onEnd?: () => void`
|
|
1253
|
+
- `onError?: (event: VideoErrorEvent) => void`
|
|
1254
|
+
- `onBuffer?: (event: { isBuffering: boolean }) => void`
|
|
1255
|
+
|
|
1256
|
+
## VideoView
|
|
1257
|
+
|
|
1258
|
+
Shows a player: `const player = useVideoPlayer(source)`, then `<VideoView player={player} />`. The view takes no remote keys; the app maps them with `useTVEventHandler` and calls `player.togglePlay()` etc.
|
|
1259
|
+
|
|
1260
|
+
### Props
|
|
1261
|
+
|
|
1262
|
+
- `player: VideoPlayerInstance`
|
|
1263
|
+
- `style?: StyleProp<ViewStyle>`
|
|
1264
|
+
- `resizeMode?: ResizeMode`
|
|
1265
|
+
- `subtitleStyle?: SubtitleStyle`
|
|
1266
|
+
|
|
1267
|
+
## VideoThumbnail
|
|
1268
|
+
|
|
1269
|
+
One scrub frame from the source's thumbnails: `<VideoThumbnail player={player} offset={-10} style={…} />`. Shows the frame `offset` seconds from the scrub position, cropped to `style`'s size; nothing when the media has no thumbnails.
|
|
1270
|
+
|
|
1271
|
+
### Props
|
|
1272
|
+
|
|
1273
|
+
- `player: VideoPlayerInstance`
|
|
1274
|
+
- `offset?: number`
|
|
1275
|
+
- `style?: StyleProp<ViewStyle>`
|
|
1276
|
+
|
|
1277
|
+
## ScrubThumbnail
|
|
1278
|
+
|
|
1279
|
+
A frame that rides above the seekbar at the scrub position while scrubbing; show the time yourself (`player.elapsedText`). Lay it over the track's width, just above it: `<ScrubThumbnail player={player} style={{ position: 'absolute', left: 0, right: 0, bottom: 24 }} />`.
|
|
1280
|
+
|
|
1281
|
+
### Props
|
|
1282
|
+
|
|
1283
|
+
- `player: VideoPlayerInstance`
|
|
1284
|
+
- `frameWidth?: number`
|
|
1285
|
+
- `style?: StyleProp<ViewStyle>`
|
|
1286
|
+
|
|
1287
|
+
## ScrubFilmstrip
|
|
1288
|
+
|
|
1289
|
+
A row of `count` scrub frames one scrub tap (`scrub.step`, 10 s by default) apart, centred on the scrub position and enlarged there, shown while scrubbing. Place it full width above the seekbar: `<ScrubFilmstrip player={player} count={5} style={…} />`.
|
|
1290
|
+
|
|
1291
|
+
### Props
|
|
1292
|
+
|
|
1293
|
+
- `player: VideoPlayerInstance`
|
|
1294
|
+
- `count?: number`
|
|
1295
|
+
- `cardWidth?: number`
|
|
1296
|
+
- `style?: StyleProp<ViewStyle>`
|
|
1297
|
+
|
|
1298
|
+
## SlickTile
|
|
1299
|
+
|
|
1300
|
+
SlickTile composite component.
|
|
1301
|
+
|
|
1302
|
+
### Props
|
|
1303
|
+
|
|
1304
|
+
- `image: string | { uri: string }` — Full-cover background image. String URL or { uri: string } object.
|
|
1305
|
+
- `aspectRatio?: number` — Tile aspect ratio. Default: 2/3 (portrait).
|
|
1306
|
+
- `shadowColor?: string` — Shadow color on focus — use dominant color of the image.
|
|
1307
|
+
- `focusScale?: number` — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1308
|
+
- `pressScale?: number` — Scale multiplier on mobile press. Default: 1.03
|
|
1309
|
+
- `focusAnimationDuration?: number` — Animation duration in ms. Default: 200
|
|
1310
|
+
- `borderRadius?: number` — Corner radius. Default: 12
|
|
1311
|
+
- `focusKey?: string` — Spatial nav focus key (web only).
|
|
1312
|
+
- `onPress?: () => void` — Press handler.
|
|
1313
|
+
- `onFocus?: (e: any) => void` — Focus handler.
|
|
1314
|
+
- `onBlur?: (e: any) => void` — Blur handler.
|
|
1315
|
+
- `accessibilityLabel?: string` — Accessibility label for screen readers / TV focus announcements.
|
|
1316
|
+
- `style?: StyleProp<ViewStyle>` — Container style override.
|
|
1317
|
+
- `enableFocusShadow?: boolean` — Enable focus shadow/elevation animation on TV focus. Default: true.
|
|
1318
|
+
- `enableDimming?: boolean` — Enable sibling dimming via ListFocusContext. Default: true.
|
|
1319
|
+
- `index?: number` — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1320
|
+
- `totalItems?: number` — Total items in the list; edge items scale from the left/right origin.
|
|
1321
|
+
- `title?: string` — Title text over the bottom gradient. Truncated to one line.
|
|
1322
|
+
- `subtitle?: string` — Secondary line below the title.
|
|
1323
|
+
- `ribbons?: ReactNode` — Ribbon badges overlaying the image edge (top-left).
|
|
1324
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1325
|
+
|
|
1326
|
+
## ProgressTile
|
|
1327
|
+
|
|
1328
|
+
ProgressTile — Continue Watching tile with a progress bar and focus play icon. Best for "Continue Watching" and "Up Next" rows.
|
|
1329
|
+
|
|
1330
|
+
### Props
|
|
1331
|
+
|
|
1332
|
+
- `image: string | { uri: string }` — Full-cover background image. Required.
|
|
1333
|
+
- `aspectRatio?: number` — Tile aspect ratio. Default: 16/9.
|
|
1334
|
+
- `progressValue?: number` — Watch progress as 0-1 ratio. Drives the default progress bar.
|
|
1335
|
+
- `progressColor?: string` — Color of the default progress bar fill. Default: '#e50914'.
|
|
1336
|
+
- `title?: string` — Title over the bottom of the image. Truncated to one line.
|
|
1337
|
+
- `metadata?: string` — Metadata line below the title (e.g. time remaining).
|
|
1338
|
+
- `progressBar?: ReactNode` — Replaces the default progress bar.
|
|
1339
|
+
- `ribbons?: ReactNode` — Ribbon badges on the image (top-left).
|
|
1340
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1341
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1342
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1343
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1344
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1345
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1346
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1347
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1348
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1349
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1350
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1351
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1352
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1353
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1354
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1355
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1356
|
+
|
|
1357
|
+
## VideoTile
|
|
1358
|
+
|
|
1359
|
+
Focus-preview tile: poster at rest, crossfading to a muted looping clip on focus.
|
|
1360
|
+
|
|
1361
|
+
### Props
|
|
1362
|
+
|
|
1363
|
+
- `image: string | { uri: string }` — Full-cover background/poster image. Required.
|
|
1364
|
+
- `aspectRatio?: number` — Tile aspect ratio. Default: 16/9.
|
|
1365
|
+
- `previewVideo?: string` — URL to the preview video clip. If not provided, tile behaves like SlickTile.
|
|
1366
|
+
- `previewDelay?: number` — Delay in ms before video starts playing after focus. Default: 1500
|
|
1367
|
+
- `title?: string` — Title text over the bottom gradient. Truncated to one line.
|
|
1368
|
+
- `metadata?: string` — Metadata line below the title.
|
|
1369
|
+
- `ribbons?: ReactNode` — Ribbon badges overlaying the image edge (top-left).
|
|
1370
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1371
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1372
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1373
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1374
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1375
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1376
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1377
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1378
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1379
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1380
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1381
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1382
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1383
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1384
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1385
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1386
|
+
|
|
1387
|
+
## SpotlightTile
|
|
1388
|
+
|
|
1389
|
+
Detail-on-focus reveal tile: small title at rest, centered detail overlay on focus.
|
|
1390
|
+
|
|
1391
|
+
### Props
|
|
1392
|
+
|
|
1393
|
+
- `image: string | { uri: string }` — Full-cover background image. String URL or { uri: string } object.
|
|
1394
|
+
- `aspectRatio?: number` — Tile aspect ratio. Default: 16/9 (landscape).
|
|
1395
|
+
- `title?: string` — Title, shown bottom-left at rest and centered in the focused overlay.
|
|
1396
|
+
- `description?: string` — Synopsis shown only in the focused overlay.
|
|
1397
|
+
- `metadata?: ReactNode` — Metadata row shown only in the focused overlay.
|
|
1398
|
+
- `ribbons?: ReactNode` — Ribbon badges overlaying the image edge (top-left).
|
|
1399
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1400
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1401
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1402
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1403
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1404
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1405
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1406
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1407
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1408
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1409
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1410
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1411
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1412
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1413
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1414
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1415
|
+
|
|
1416
|
+
## PosterTile
|
|
1417
|
+
|
|
1418
|
+
PosterTile — clean portrait card with a metadata block below the image. Best for dense content grids, search results and browse-by-genre rows.
|
|
1419
|
+
|
|
1420
|
+
### Props
|
|
1421
|
+
|
|
1422
|
+
- `image: string | { uri: string }` — Full-cover background image. Required.
|
|
1423
|
+
- `aspectRatio?: number` — Tile image aspect ratio. Default: 2/3 (portrait).
|
|
1424
|
+
- `title?: string` — Title text below the image. Truncated to one line.
|
|
1425
|
+
- `subtitle?: string` — Subtitle below the title (e.g. genre, network).
|
|
1426
|
+
- `metadata?: string` — Metadata line below the subtitle (e.g. rating, year).
|
|
1427
|
+
- `ribbons?: ReactNode` — Ribbon badges overlaying the image edge (top-left).
|
|
1428
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1429
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1430
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1431
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1432
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1433
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1434
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1435
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1436
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1437
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1438
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1439
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1440
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1441
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1442
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1443
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1444
|
+
|
|
1445
|
+
## ThumbTile
|
|
1446
|
+
|
|
1447
|
+
ThumbTile — 16:9 thumbnail with a duration badge and a metadata block below. Best for extras, trailers, behind-the-scenes and clips.
|
|
1448
|
+
|
|
1449
|
+
### Props
|
|
1450
|
+
|
|
1451
|
+
- `image: string | { uri: string }` — Full-cover background image. Required.
|
|
1452
|
+
- `aspectRatio?: number` — Tile image aspect ratio. Default: 16/9 (landscape).
|
|
1453
|
+
- `title?: string` — Title text below the image. Truncated to one line.
|
|
1454
|
+
- `subtitle?: string` — Subtitle below the title (e.g. channel or source name).
|
|
1455
|
+
- `metadata?: string` — Metadata line (e.g. view count, timestamp).
|
|
1456
|
+
- `duration?: string` — Duration badge text, shown bottom-right on the image.
|
|
1457
|
+
- `ribbons?: ReactNode` — Ribbon badges on the image edge (top-left).
|
|
1458
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1459
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1460
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1461
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1462
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1463
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1464
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1465
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1466
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1467
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1468
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1469
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1470
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1471
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1472
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1473
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1474
|
+
|
|
1475
|
+
## RankTile
|
|
1476
|
+
|
|
1477
|
+
RankTile — Top 10 style tile with a watermark rank number and a corner badge. Best for "Top 10 in Your Country" and trending lists.
|
|
1478
|
+
|
|
1479
|
+
### Props
|
|
1480
|
+
|
|
1481
|
+
- `image: string | { uri: string }` — Full-cover background image. Required.
|
|
1482
|
+
- `aspectRatio?: number` — Tile aspect ratio. Default: 2/3 (portrait).
|
|
1483
|
+
- `rank: number` — The ranking position (1-10+). Drives the watermark number and badge.
|
|
1484
|
+
- `badgeColors?: [string, string]` — Badge gradient colors. Default: ['#e50914', '#b20710'].
|
|
1485
|
+
- `title?: string` — Title text over the bottom of the image. Truncated to one line.
|
|
1486
|
+
- `movement?: string` — Movement indicator below the title (e.g. "▲ 3 today").
|
|
1487
|
+
- `rankOverlay?: ReactNode` — Replaces the default watermark rank number.
|
|
1488
|
+
- `ribbons?: ReactNode` — Ribbon badges on the image (top-left).
|
|
1489
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1490
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1491
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1492
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1493
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1494
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1495
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1496
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1497
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1498
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1499
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1500
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1501
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1502
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1503
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1504
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1505
|
+
|
|
1506
|
+
## MorphTile
|
|
1507
|
+
|
|
1508
|
+
Expanding browse card: a portrait poster that widens on focus and reveals a detail panel.
|
|
1509
|
+
|
|
1510
|
+
### Props
|
|
1511
|
+
|
|
1512
|
+
- `image: string | { uri: string }` — Full-cover background image. Required.
|
|
1513
|
+
- `expandRatio?: number` — Width expansion ratio when focused. Default: 2.7
|
|
1514
|
+
- `expandDuration?: number` — Duration of the width expansion in ms. Default: 400
|
|
1515
|
+
- `contentRevealDuration?: number` — Duration of the metadata fade-in after expansion in ms. Default: 200
|
|
1516
|
+
- `title?: string` — Title, shown at the bottom when collapsed and in the panel when expanded.
|
|
1517
|
+
- `metadata?: ReactNode` — Metadata row, visible after expansion.
|
|
1518
|
+
- `description?: string` — Synopsis, visible after expansion.
|
|
1519
|
+
- `genres?: ReactNode` — Genre tags, visible after expansion.
|
|
1520
|
+
- `ribbons?: ReactNode` — Ribbon badges overlaying the image edge (top-left).
|
|
1521
|
+
- `overlay?: ReactNode` — General overlay on the image area.
|
|
1522
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1523
|
+
- `aspectRatio?: number` _(inherited)_ — Tile aspect ratio. Each tile defines its own default.
|
|
1524
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1525
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1526
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1527
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1528
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1529
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1530
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1531
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1532
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1533
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1534
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1535
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1536
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1537
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1538
|
+
|
|
1539
|
+
## StackTile
|
|
1540
|
+
|
|
1541
|
+
StackTile — collection tile whose three layered posters fan out on focus. Uses `images` (plural) instead of `image` from BaseTileProps.
|
|
1542
|
+
|
|
1543
|
+
### Props
|
|
1544
|
+
|
|
1545
|
+
- `images: (string | { uri: string })[]` — Array of 1-3 image sources for the stack layers. Duplicates last if fewer than 3.
|
|
1546
|
+
- `aspectRatio?: number` — Image aspect ratio for each layer. Default: 2/3 (portrait).
|
|
1547
|
+
- `borderRadius?: number` — Corner radius for each layer. Default: 10.
|
|
1548
|
+
- `title?: string` — Collection title below the stack. Truncated to one line.
|
|
1549
|
+
- `countLabel?: string` — Item count text below the title (e.g. "12 titles").
|
|
1550
|
+
- `ribbons?: ReactNode` — Ribbon badges on the front image (top-left).
|
|
1551
|
+
- `overlay?: ReactNode` — General overlay on the front image.
|
|
1552
|
+
- `accessibilityLabel?: string` _(inherited)_ — Accessibility label for screen readers / TV focus announcements.
|
|
1553
|
+
- `enableDimming?: boolean` _(inherited)_ — Dim unfocused siblings in the same list via ListFocusContext. Default: true.
|
|
1554
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable the focus shadow/elevation animation. Default: true.
|
|
1555
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1556
|
+
- `focusKey?: string` _(inherited)_ — Spatial nav focus key (web only).
|
|
1557
|
+
- `focusScale?: number` _(inherited)_ — Scale multiplier when focused (TV) or pressed (mobile). Default: 1.08
|
|
1558
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1559
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1560
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1561
|
+
- `onPress?: () => void` _(inherited)_ — Press handler.
|
|
1562
|
+
- `pressScale?: number` _(inherited)_ — Scale multiplier on mobile press. Default: 1.03
|
|
1563
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus — use dominant color of the image.
|
|
1564
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1565
|
+
- `totalItems?: number` _(inherited)_ — Total items in the list; edge items scale from the left/right origin.
|
|
1566
|
+
|
|
1567
|
+
## BillboardHero
|
|
1568
|
+
|
|
1569
|
+
BillboardHero — Netflix-style full-bleed cinematic hero. Portrait centres the content; landscape left-aligns it with synopsis and action buttons.
|
|
1570
|
+
|
|
1571
|
+
### Props
|
|
1572
|
+
|
|
1573
|
+
- `height?: number` — Hero height. Default: getFormFactor()-based (450 portrait / 550 landscape).
|
|
1574
|
+
- `gradientColors?: string[]` — Bottom gradient colors.
|
|
1575
|
+
- `logo?: ReactNode` — Show/movie logo image. Landscape: center-left. Portrait: center.
|
|
1576
|
+
- `title?: string` — Title text, shown when no logo is supplied.
|
|
1577
|
+
- `description?: string` — Synopsis text, clamped to three lines.
|
|
1578
|
+
- `actions?: ReactNode` — Action buttons row (Play, More Info).
|
|
1579
|
+
- `ribbons?: ReactNode` — Badge labels (NEW, 4K) — top-left.
|
|
1580
|
+
- `overlay?: ReactNode` — Custom overlay content — full area.
|
|
1581
|
+
- `underlay?: ReactNode` — Scrims rendered below the text content and above the built-in bottom gradient.
|
|
1582
|
+
- `accessibilityLabel?: string` _(inherited)_ — Screen reader label.
|
|
1583
|
+
- `activeIndex?: number` _(inherited)_ — Controlled active slide index. Default: 0
|
|
1584
|
+
- `autoPlay?: boolean` _(inherited)_ — Enable auto-advancement. Default: true
|
|
1585
|
+
- `autoPlayInterval?: number` _(inherited)_ — Interval between auto-advances in ms. Default: 6000
|
|
1586
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1587
|
+
- `enableDimming?: boolean` _(inherited)_ — Sibling dimming via ListFocusContext. Default: false
|
|
1588
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable focus shadow/elevation animation on TV focus. Default: true. Set to false to disable shadow glow on focus.
|
|
1589
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1590
|
+
- `focusScale?: number` _(inherited)_ — Scale on TV focus / mobile press. Default: 1.05
|
|
1591
|
+
- `gradientColor?: string` _(inherited)_ — Background color for bottom gradient blend. Should match page background. Typically bound to theme: { "$expr": "theme", "path": "colors.background" }
|
|
1592
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1593
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1594
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1595
|
+
- `onPress?: () => void` _(inherited)_ — Press handler (whole hero).
|
|
1596
|
+
- `onSlideChange?: (index: number) => void` _(inherited)_ — Callback when active slide changes.
|
|
1597
|
+
- `onSlidePress?: (index: number) => void` _(inherited)_ — Press handler with slide index.
|
|
1598
|
+
- `pauseOnInteraction?: boolean` _(inherited)_ — Pause auto-play on user interaction. Default: true
|
|
1599
|
+
- `pressScale?: number` _(inherited)_ — Scale on mobile press start. Default: 1.02
|
|
1600
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus.
|
|
1601
|
+
- `slides: HeroSlide[]` _(inherited)_ — Array of slide data objects.
|
|
1602
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1603
|
+
- `transition?: 'fade' | 'slide' | 'none'` _(inherited)_ — Slide transition type. Default: 'fade'
|
|
1604
|
+
- `transitionDuration?: number` _(inherited)_ — Transition animation duration in ms. Default: 500
|
|
1605
|
+
|
|
1606
|
+
## TVKeyboard
|
|
1607
|
+
|
|
1608
|
+
On-screen TV keyboard: pass it as a TextInput's tvKeyboard prop (bottom, side, full) or place variant "search" inline beside results.
|
|
1609
|
+
|
|
1610
|
+
### Props
|
|
1611
|
+
|
|
1612
|
+
- `variant?: 'bottom' | 'side' | 'full' | 'search'` — Frame: "bottom" panel (default), "side" panel, "full" screen, or "search" inline beside results.
|
|
1613
|
+
- `side?: 'left' | 'right'` — Screen edge the side panel pins to; default "right".
|
|
1614
|
+
- `layouts?: ('latin' | 'arabic' | 'symbols')[]` — Pages offered, in order; default ["latin", "symbols"]. Add "arabic" for an Arabic letter page.
|
|
1615
|
+
- `style?: StyleProp<ViewStyle>` — Panel or container; for bottom and full it sizes the whole panel (960 wide by default).
|
|
1616
|
+
- `contentStyle?: StyleProp<ViewStyle>` — Key column; its width is the key grid width (636 for bottom and full by default).
|
|
1617
|
+
- `keyStyle?: StyleProp<ViewStyle>` — Every key at rest; its height sets the key height for the whole grid.
|
|
1618
|
+
- `keyFocusedStyle?: StyleProp<ViewStyle>` — The focused key.
|
|
1619
|
+
- `keyPressedStyle?: StyleProp<ViewStyle>` — The brief flash when a key is pressed.
|
|
1620
|
+
- `keyActiveStyle?: StyleProp<ViewStyle>` — Shift while capitals are on, and the page key while symbols show.
|
|
1621
|
+
- `keyLabelActiveStyle?: StyleProp<TextStyle>` — Label of an active toggle key when it is not focused.
|
|
1622
|
+
- `keyDimmedStyle?: StyleProp<ViewStyle>` — A key that does nothing right now; it stays focusable.
|
|
1623
|
+
- `keyLabelDimmedStyle?: StyleProp<TextStyle>` — Label of a dimmed key.
|
|
1624
|
+
- `keyLabelStyle?: StyleProp<TextStyle>` — Letter, digit and symbol key labels.
|
|
1625
|
+
- `specialKeyLabelStyle?: StyleProp<TextStyle>` — Space, Delete, Clear, Done, page, Shift and script key labels.
|
|
1626
|
+
- `keyLabelFocusedStyle?: StyleProp<TextStyle>` — Label of the focused key.
|
|
1627
|
+
- `doneKeyStyle?: StyleProp<ViewStyle>` — The Done key at rest.
|
|
1628
|
+
- `doneKeyLabelStyle?: StyleProp<TextStyle>` — The Done key's label.
|
|
1629
|
+
- `echoStyle?: StyleProp<ViewStyle>` — Box that shows the typed text.
|
|
1630
|
+
- `echoTextStyle?: StyleProp<TextStyle>` — Typed text and placeholder inside the echo box.
|
|
1631
|
+
- `labelStyle?: StyleProp<TextStyle>` — Field-name line and message line above the echo box.
|
|
1632
|
+
- `micListeningColor?: string` — Mic icon colour while listening.
|
|
1633
|
+
- `keyFocusScale?: number` — Focus grow of one-column keys; default 1.08.
|
|
1634
|
+
- `wideKeyFocusScale?: number` — Focus grow of keys two or more columns wide; default 1.03.
|
|
1635
|
+
- `value?: string` — Search only: the search text.
|
|
1636
|
+
- `onChangeText?: (text: string) => void` — Search only: called with the new text on every key.
|
|
1637
|
+
- `placeholder?: string` — Search only: shown while the text is empty; default "Search".
|
|
1638
|
+
|
|
1639
|
+
## CinematicHero
|
|
1640
|
+
|
|
1641
|
+
CinematicHero — Disney+/Apple TV+ center-focused hero. A thumbnail strip replaces the pagination dots for slide navigation.
|
|
1642
|
+
|
|
1643
|
+
### Props
|
|
1644
|
+
|
|
1645
|
+
- `height?: number` — Hero height. Default: getFormFactor()-based.
|
|
1646
|
+
- `thumbnailAspectRatio?: number` — Aspect ratio of thumbnails in the strip. Default: 16/9
|
|
1647
|
+
- `thumbnailWidth?: number` — Width of each thumbnail. Default: 80
|
|
1648
|
+
- `logo?: ReactNode` — Primary logo/title image — center of hero.
|
|
1649
|
+
- `title?: string` — Title text, shown below the logo.
|
|
1650
|
+
- `subtitle?: ReactNode` — Supporting line below the title ("Original Movie", release date, runtime).
|
|
1651
|
+
- `actions?: ReactNode` — Play button + icon buttons.
|
|
1652
|
+
- `thumbnails?: ReactNode` — Custom thumbnail content, replacing the default strip.
|
|
1653
|
+
- `overlay?: ReactNode` — Custom overlay — full area.
|
|
1654
|
+
- `accessibilityLabel?: string` _(inherited)_ — Screen reader label.
|
|
1655
|
+
- `activeIndex?: number` _(inherited)_ — Controlled active slide index. Default: 0
|
|
1656
|
+
- `autoPlay?: boolean` _(inherited)_ — Enable auto-advancement. Default: true
|
|
1657
|
+
- `autoPlayInterval?: number` _(inherited)_ — Interval between auto-advances in ms. Default: 6000
|
|
1658
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1659
|
+
- `enableDimming?: boolean` _(inherited)_ — Sibling dimming via ListFocusContext. Default: false
|
|
1660
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable focus shadow/elevation animation on TV focus. Default: true. Set to false to disable shadow glow on focus.
|
|
1661
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1662
|
+
- `focusScale?: number` _(inherited)_ — Scale on TV focus / mobile press. Default: 1.05
|
|
1663
|
+
- `gradientColor?: string` _(inherited)_ — Background color for bottom gradient blend. Should match page background. Typically bound to theme: { "$expr": "theme", "path": "colors.background" }
|
|
1664
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1665
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1666
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1667
|
+
- `onPress?: () => void` _(inherited)_ — Press handler (whole hero).
|
|
1668
|
+
- `onSlideChange?: (index: number) => void` _(inherited)_ — Callback when active slide changes.
|
|
1669
|
+
- `onSlidePress?: (index: number) => void` _(inherited)_ — Press handler with slide index.
|
|
1670
|
+
- `pauseOnInteraction?: boolean` _(inherited)_ — Pause auto-play on user interaction. Default: true
|
|
1671
|
+
- `pressScale?: number` _(inherited)_ — Scale on mobile press start. Default: 1.02
|
|
1672
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus.
|
|
1673
|
+
- `slides: HeroSlide[]` _(inherited)_ — Array of slide data objects.
|
|
1674
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1675
|
+
- `transition?: 'fade' | 'slide' | 'none'` _(inherited)_ — Slide transition type. Default: 'fade'
|
|
1676
|
+
- `transitionDuration?: number` _(inherited)_ — Transition animation duration in ms. Default: 500
|
|
1677
|
+
|
|
1678
|
+
## GalleryHero
|
|
1679
|
+
|
|
1680
|
+
GalleryHero — Apple TV+ cover flow multi-card carousel. Adjacent cards take a 3D perspective rotation, reduced scale and opacity; always slides.
|
|
1681
|
+
|
|
1682
|
+
### Props
|
|
1683
|
+
|
|
1684
|
+
- `height?: number` — Hero height. Default: getFormFactor()-based (380 portrait / 450 landscape).
|
|
1685
|
+
- `cardAspectRatio?: number` — Aspect ratio of each card. Default: 2/3
|
|
1686
|
+
- `cardWidth?: number` — Width of center card. Default: 150
|
|
1687
|
+
- `peekScale?: number` — Scale of adjacent cards. Default: 0.85
|
|
1688
|
+
- `peekOpacity?: number` — Opacity of adjacent cards. Default: 0.5
|
|
1689
|
+
- `perspective?: boolean` — Enable 3D rotateY on side cards. Default: true
|
|
1690
|
+
- `visibleCards?: number` — Cards visible at once. Default: getFormFactor()-based (5 landscape / 3 portrait).
|
|
1691
|
+
- `title?: string` — Content title, over the card's bottom gradient.
|
|
1692
|
+
- `metadata?: ReactNode` — Genre, year — below the title.
|
|
1693
|
+
- `actions?: ReactNode` — Play, Details buttons — rendered on the center card only.
|
|
1694
|
+
- `overlay?: ReactNode` — Custom overlay on the card image area.
|
|
1695
|
+
- `accessibilityLabel?: string` _(inherited)_ — Screen reader label.
|
|
1696
|
+
- `activeIndex?: number` _(inherited)_ — Controlled active slide index. Default: 0
|
|
1697
|
+
- `autoPlay?: boolean` _(inherited)_ — Enable auto-advancement. Default: true
|
|
1698
|
+
- `autoPlayInterval?: number` _(inherited)_ — Interval between auto-advances in ms. Default: 6000
|
|
1699
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1700
|
+
- `enableDimming?: boolean` _(inherited)_ — Sibling dimming via ListFocusContext. Default: false
|
|
1701
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable focus shadow/elevation animation on TV focus. Default: true. Set to false to disable shadow glow on focus.
|
|
1702
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1703
|
+
- `focusScale?: number` _(inherited)_ — Scale on TV focus / mobile press. Default: 1.05
|
|
1704
|
+
- `gradientColor?: string` _(inherited)_ — Background color for bottom gradient blend. Should match page background. Typically bound to theme: { "$expr": "theme", "path": "colors.background" }
|
|
1705
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1706
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1707
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1708
|
+
- `onPress?: () => void` _(inherited)_ — Press handler (whole hero).
|
|
1709
|
+
- `onSlideChange?: (index: number) => void` _(inherited)_ — Callback when active slide changes.
|
|
1710
|
+
- `onSlidePress?: (index: number) => void` _(inherited)_ — Press handler with slide index.
|
|
1711
|
+
- `pauseOnInteraction?: boolean` _(inherited)_ — Pause auto-play on user interaction. Default: true
|
|
1712
|
+
- `pressScale?: number` _(inherited)_ — Scale on mobile press start. Default: 1.02
|
|
1713
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus.
|
|
1714
|
+
- `slides: HeroSlide[]` _(inherited)_ — Array of slide data objects.
|
|
1715
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1716
|
+
- `transitionDuration?: number` _(inherited)_ — Transition animation duration in ms. Default: 500
|
|
1717
|
+
|
|
1718
|
+
## TrailerHero
|
|
1719
|
+
|
|
1720
|
+
TrailerHero — video-first hero with auto-playing trailers and a sound toggle. Portrait splits video over an info panel; landscape is full-bleed with a floating info bar.
|
|
1721
|
+
|
|
1722
|
+
### Props
|
|
1723
|
+
|
|
1724
|
+
- `height?: number` — Hero height. Default: getFormFactor()-based.
|
|
1725
|
+
- `videoDelay?: number` — Delay before video starts after slide becomes active. Default: 1000
|
|
1726
|
+
- `muted?: boolean` — Start muted. Default: true
|
|
1727
|
+
- `showSoundToggle?: boolean` — Show mute/unmute toggle button. Default: true
|
|
1728
|
+
- `fallbackMode?: 'static' | 'parallax'` — Fallback behavior when no videoSrc on slide. Default: 'parallax'
|
|
1729
|
+
- `title?: string` — Content title. Landscape: bottom-left. Portrait: below video.
|
|
1730
|
+
- `metadata?: ReactNode` — Match score, year, rating, duration.
|
|
1731
|
+
- `description?: string` — Synopsis text, clamped to two lines.
|
|
1732
|
+
- `actions?: ReactNode` — Watch Now, + List buttons.
|
|
1733
|
+
- `badge?: ReactNode` — Replaces the built-in "TRAILER" label — top-left.
|
|
1734
|
+
- `overlay?: ReactNode` — Custom overlay — full video area.
|
|
1735
|
+
- `accessibilityLabel?: string` _(inherited)_ — Screen reader label.
|
|
1736
|
+
- `activeIndex?: number` _(inherited)_ — Controlled active slide index. Default: 0
|
|
1737
|
+
- `autoPlay?: boolean` _(inherited)_ — Enable auto-advancement. Default: true
|
|
1738
|
+
- `autoPlayInterval?: number` _(inherited)_ — Interval between auto-advances in ms. Default: 6000
|
|
1739
|
+
- `borderRadius?: number` _(inherited)_ — Corner radius. Default: 12
|
|
1740
|
+
- `enableDimming?: boolean` _(inherited)_ — Sibling dimming via ListFocusContext. Default: false
|
|
1741
|
+
- `enableFocusShadow?: boolean` _(inherited)_ — Enable focus shadow/elevation animation on TV focus. Default: true. Set to false to disable shadow glow on focus.
|
|
1742
|
+
- `focusAnimationDuration?: number` _(inherited)_ — Animation duration in ms. Default: 200
|
|
1743
|
+
- `focusScale?: number` _(inherited)_ — Scale on TV focus / mobile press. Default: 1.05
|
|
1744
|
+
- `gradientColor?: string` _(inherited)_ — Background color for bottom gradient blend. Should match page background. Typically bound to theme: { "$expr": "theme", "path": "colors.background" }
|
|
1745
|
+
- `index?: number` _(inherited)_ — Item index within the list (from FlashList renderItem). Used for index-based focus tracking.
|
|
1746
|
+
- `onBlur?: (e: any) => void` _(inherited)_ — Blur handler.
|
|
1747
|
+
- `onFocus?: (e: any) => void` _(inherited)_ — Focus handler.
|
|
1748
|
+
- `onPress?: () => void` _(inherited)_ — Press handler (whole hero).
|
|
1749
|
+
- `onSlideChange?: (index: number) => void` _(inherited)_ — Callback when active slide changes.
|
|
1750
|
+
- `onSlidePress?: (index: number) => void` _(inherited)_ — Press handler with slide index.
|
|
1751
|
+
- `pauseOnInteraction?: boolean` _(inherited)_ — Pause auto-play on user interaction. Default: true
|
|
1752
|
+
- `pressScale?: number` _(inherited)_ — Scale on mobile press start. Default: 1.02
|
|
1753
|
+
- `shadowColor?: string` _(inherited)_ — Shadow color on focus.
|
|
1754
|
+
- `slides: HeroSlide[]` _(inherited)_ — Array of slide data objects.
|
|
1755
|
+
- `style?: StyleProp<ViewStyle>` _(inherited)_ — Container style override.
|
|
1756
|
+
- `transition?: 'fade' | 'slide' | 'none'` _(inherited)_ — Slide transition type. Default: 'fade'
|
|
1757
|
+
- `transitionDuration?: number` _(inherited)_ — Transition animation duration in ms. Default: 500
|
|
1758
|
+
|
|
1759
|
+
## Icon
|
|
1760
|
+
|
|
1761
|
+
Closed primitive contract shared by the native and DOM backends.
|
|
1762
|
+
|
|
1763
|
+
### Props
|
|
1764
|
+
|
|
1765
|
+
- `icon: IconSource`
|
|
1766
|
+
- `size: number`
|
|
1767
|
+
- `color: string`
|
|
1768
|
+
|
|
1769
|
+
## FocusGroup
|
|
1770
|
+
|
|
1771
|
+
Groups focusables so arrow keys move between them along one axis.
|
|
1772
|
+
|
|
1773
|
+
### Props
|
|
1774
|
+
|
|
1775
|
+
- `direction?: 'horizontal' | 'vertical'` — Axis the arrow keys move along inside the group; defaults to horizontal.
|
|
1776
|
+
- `remember?: boolean` — Return focus to the last focused child when focus re-enters the group.
|
|
1777
|
+
- `trap?: boolean` — Keep focus inside the group, for modals and menus; focus returns to the opener when it closes.
|
|
1778
|
+
- `autoFocus?: boolean` — Take focus once when the group mounts.
|
|
1779
|
+
|
|
1780
|
+
## Screen
|
|
1781
|
+
|
|
1782
|
+
The focus boundary every screen's content sits in; wrap each registered screen's content in one.
|