Defines primitive types for React Native components, refs, and slot composition patterns.
// Source: https://github.com/heroui-inc/heroui-native | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import type {
Image,
Pressable,
ScrollView,
Text,
TextInput,
View,
ViewStyle,
} from 'react-native';
// Base utility types
/**
* Component props with optional asChild prop for polymorphic components
* Allows components to render as different elements when asChild is true
*/
type ComponentPropsWithAsChild<T extends React.ElementType<any>> =
React.ComponentPropsWithoutRef<T> & { asChild?: boolean };
// Ref types
/**
* Reference type for React Native View component
* Used for forwarding refs to View elements
*/
interface ViewRef extends React.ComponentRef<t
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key