Skip to content
  • Android
  • iOS
  • Web

View

Lay out and style a group of engine children.

Engine API NViewnayan-ui/components

Live examples

Example.tsx

Attributes

A web tag also accepts the HTML attributes for that element.

NView attributes
NameTypeDefaultDetails
childrenReactNodeOptional
tagstringOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
stylefalse | void | "" | ComponentStyle | readonly ComponentStyleProp[] | ViewStyle | readonly StyleProp<ViewStyle>[] | nullOptional
idstringOptional
rolestringOptional
accessibilityLabelstringOptional
ref((instance: ReactNativeElement | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<ReactNativeElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLElement | null> | ((instance: NViewRef | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<NViewRef | null> | nullOptional
React Native API

React Native attributes

NView react native attributes
NameTypeDefaultDetails
childrenReactNodeOptional
tagstringOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
stylefalse | void | "" | ViewStyle | readonly StyleProp<ViewStyle>[] | ComponentStyle | readonly ComponentStyleProp[] | nullOptional
idstringOptional
rolestringOptional
accessibilityLabelstringOptional
ref((instance: ReactNativeElement | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<ReactNativeElement | null> | ((instance: HTMLElement | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLElement | null> | ((instance: NViewRef | null) => void | (() => VoidOrUndefinedOnly) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<NViewRef | null> | nullOptional

Tags