- Android
- iOS
- Web
View
Lay out and style a group of engine children.
Engine API NViewnayan-ui/components
Example.tsx
A web tag also accepts the HTML attributes for that element.
| Name | Type | Default | Details |
|---|---|---|---|
| children | ReactNode | Optional | |
| tag | string | Optional | |
| className | string | Optional | Supported Tailwind-style utilities, resolved entirely in Rust. See the engine README. |
| style | false | void | "" | ComponentStyle | readonly ComponentStyleProp[] | ViewStyle | readonly StyleProp<ViewStyle>[] | null | Optional | |
| id | string | Optional | |
| role | string | Optional | |
| accessibilityLabel | string | Optional | |
| 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> | null | Optional |
React Native API
| Name | Type | Default | Details |
|---|---|---|---|
| children | ReactNode | Optional | |
| tag | string | Optional | |
| className | string | Optional | Supported Tailwind-style utilities, resolved entirely in Rust. See the engine README. |
| style | false | void | "" | ViewStyle | readonly StyleProp<ViewStyle>[] | ComponentStyle | readonly ComponentStyleProp[] | null | Optional | |
| id | string | Optional | |
| role | string | Optional | |
| accessibilityLabel | string | Optional | |
| 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> | null | Optional |