Textarea
Multiline Input with a useful minimum height, themed states, and forwarded native editing props.
Install
First install? Set up the registry in your app.
npx --yes --package=https://native.uipkge.dev/cli/uipkge-native-0.1.1.tgz uipkge-native add textareaSource files
Expand a file to read the source the installer copies into your app.
components/ui/textarea/Textarea.tsx
import * as React from 'react'
import { TextInput } from 'react-native'
import { Input, type InputProps } from '@/components/ui/input'
import { cn } from '@/lib/utils'
export interface TextareaProps extends Omit<InputProps, 'multiline'> {}
export const Textarea = React.forwardRef<React.ComponentRef<typeof TextInput>, TextareaProps>(
({ className, containerClassName, textAlignVertical = 'top', ...props }, ref) => (
<Input
ref={ref}
{...props}
multiline
textAlignVertical={textAlignVertical}
className={cn('min-h-[112px] py-3', className)}
containerClassName={cn('items-start', containerClassName)}
/>
),
)
Textarea.displayName = 'Textarea'
components/ui/textarea/index.ts
export * from './Textarea'