Skip to content
  • Android
  • iOS
  • Web

Page

Render a screen surface with optional keyboard handling, safe-area insets and viewport sizing.

Engine API NPagenayan-ui/components

Live examples

Example.tsx

Attributes

NPage attributes
NameTypeDefaultDetails
childrenReactNodeOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
styleComponentStylePropOptional
fillViewportbooleanOptional
viewportStyleReact.CSSPropertiesOptional
surfaceOmit<ComponentsRootProps, "style" | "children" | "stylesheet">Optional
activebooleanOptionalPause the surface while its screen is inactive.
keyboardbooleanOptional
safeAreabooleanOptionalProtect the end of the page's scroll content. Defaults to true on native.
showsVerticalScrollIndicatorbooleanOptionalHide the page's root indicator without disabling scrolling.
backgroundstringOptionalSurface clear color; useful for opaque modal content.
onContentSizeChange((width: number, height: number) => void)Optional
onError((error: Error) => void)Optional
React Native API

React Native attributes

NPage react native attributes
NameTypeDefaultDetails
childrenReactNodeOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
styleComponentStylePropOptional
fillViewportbooleanOptional
viewportStyleViewStyleOptional
surfaceOmit<ComponentsRootProps, "style" | "children" | "stylesheet">Optional
activebooleanOptionalPause the surface while its screen is inactive.
keyboardbooleanOptional
safeAreabooleanOptionalProtect the end of the page's scroll content. Defaults to true on native.
showsVerticalScrollIndicatorbooleanOptionalHide the page's root indicator without disabling scrolling.
backgroundstringOptionalSurface clear color; useful for opaque modal content.
onContentSizeChange((width: number, height: number) => void)Optional
onError((error: Error) => void)Optional

Tags