Textarea
nativeui/textareaFreeComponent
A textarea component for React Native applications.
Live preview
live · rendered by the registry
Rendered by nativeui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nativeui.ribbi.ch/r/textarea.jsonSource
1import * as React from "react"2import { TextInput, Platform } from "react-native"3import { cn } from "@/lib/utils"45const TextArea = React.forwardRef<TextInput, React.ComponentProps<typeof TextInput>>(6 ({ className, ...props }, ref) => {7 const [isFocused, setIsFocused] = React.useState(false)89 return (10 <TextInput11 className={cn(12 "min-h-[120px] w-full rounded-md border border-input bg-transparent px-3 py-3 text-primary shadow-sm",13 "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",14 "text-base multiline",15 isFocused ? "border-ring ring-1 ring-ring" : "",16 Platform.OS === "ios" ? "ios:shadow-sm ios:shadow-foreground/10" : "android:elevation-1",17 className18 )}19 ref={ref}20 multiline={true}21 textAlignVertical="top"22 underlineColorAndroid="transparent"23 onFocus={() => setIsFocused(true)}24 onBlur={() => setIsFocused(false)}25 {...props}26 />27 )28 }29)3031TextArea.displayName = "TextArea"3233export { TextArea }
What it pulls in
npm packages
Files it writes
More from nativeui
All 29 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | nativeui | Components | Free | 2 deps | |
| Alertalert | nativeui | Components | Free | 2 deps | |
| Alert Dialogalert-dialog | nativeui | Components | Free | 1 dep | |
| Avataravatar | nativeui | Components | Free | 1 dep | |
| Badgebadge | nativeui | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | nativeui | Components | Free | 2 deps | |
| Buttonbutton | nativeui | Components | Free | 2 deps | |
| Calendarcalendar | nativeui | Components | Free | 4 deps |
