GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.nativebase.io — TextArea | NativeBase | Universal Components for React and React Native

TextArea | NativeBase | Universal Components for React and React Native

NativeBase
3.4.x
🎉 Prompt to React Native UI
→
Search
⌘
K
Hire us
NativeBase
Introduction
Getting Started
Installation
Setup NativeBase Provider
Migration
Upgrading to v3
Upgrading to 3.2.0 from 3.x
Upgrading to 3.4.0 from 3.3.x
Components Migration
ActionSheet
Badge
Button
Card
Checkbox
DatePicker
DeckSwiper
Drawer
FABs
FooterTab
Form
Header
Icon
Layout
Picker
Radio Button
Searchbar
Segment
Spinner
SwipeList
Tabs
Thumbnail
Toast
Typography
Resources
Contribution
Creating a Universal App with NativeBase and Solito
Core Concepts
Utility First
Utility Props Specificity
Design Tokens
Pseudo Props: Overview
Pseudo Props: Dos & Don'ts
Internal Pseudo Props
Responsive
Features
Utility Props
Color mode (Dark Mode)
NativeBase Factory
SafeAreaView Props
Strict Mode
Accessibility
Theme
Default Theme
Customizing Theme
Customizing Fonts
Customizing Components
Making components dark mode compatible
Breakpoints
Using Theme
TypeScript
Layout
AspectRatio
Box
Center
Container
Flex
HStack / Row
Stack
VStack / Column
ZStack
Forms
Button
Pressable
Checkbox
FormControl
IconButton
Input
Link
Radio
Select
Slider
Switch
TextArea
Data Display
Badge
Divider
Feedback
Alert
Progress
Skeleton
Spinner
Toast
Typography
Text
Heading
Overlay
AlertDialog
Menu
Modal
Popover
Tooltip
Disclosure
ActionSheet
Media and Icons
Avatar
Icon
Image
Transition
PresenceTransition
Slide
Stagger
Others
Fab
Hidden
ReactNative Components
ScrollView
View
KeyboardAvoidingView
StatusBar
FlatList
SectionList
Hooks
useDisclose
useBreakpointValue
useClipboard
useMediaQuery
useTheme
useToken
useColorMode
useColorModeValue
useContrastText
useAccessibleColors
Examples
Todo-List
Kitchen Sink
Recipes
Designs
AppBar
Card
Drawer Navigation
Tab View
Swipe List
Forms
Form with Validation
Login/Signup Forms
SearchBar
Layout
App Drawer
Footer
More
Changelog
Testing
FAQ's
More Props
If you are starting a new project, please try gluestack-ui for better performance and new design.
TextArea
The Textarea component helps create multi-line text inputs.
Show Code
Playground
const Example = () => {
return <TextArea shadow={2} h={20} placeholder="Text Area Placeholder" w="200" _light={{
placeholderTextColor: "trueGray.700",
bg: "coolGray.100",
_hover: {
bg: "coolGray.200"
},
_focus: {
bg: "coolGray.200:alpha.70"
}
}} _dark={{
bg: "coolGray.800",
_hover: {
bg: "coolGray.900"
},
_focus: {
bg: "coolGray.900:alpha.70"
}
}} />;
};
Examples
Usage
Playground
const Example = () => {
return <Box alignItems="center" w="100%">
<TextArea h={20} placeholder="Text Area Placeholder" w="75%" maxW="300" />
</Box>;
};
Invalid and Disabled TextArea
Playground
const Example = () => {
return <Box alignItems="center" w="100%">
<Stack space={2.5} w="75%" maxW="300">
<Box>
<Text mb="4" bold fontSize="lg">
Invalid TextArea
</Text>
<TextArea aria-label="t1" numberOfLines={4} placeholder="Invalid TextArea" isInvalid _dark={{
placeholderTextColor: "gray.300"
}} mb="5" />
<Divider />
</Box>
<Box>
<Text bold fontSize="lg" mb="4">
Disabled TextArea
</Text>
<TextArea aria-label="t1Disabled" placeholder="Disabled TextArea" isDisabled />
</Box>
</Stack>
</Box>;
};
Value Controlled TextArea
Playground
const Example = () => {
const [textAreaValue, setTextAreaValue] = useState("Value Controlled");
return <Box alignItems="center" w="100%">
<TextArea value={textAreaValue} onChange={e => setTextAreaValue(e.currentTarget.value)} // for web
onChangeText={text => setTextAreaValue(text)} // for android and ios
w="75%" maxW="300" />
</Box>;
};
Props
TextArea implements
PlatformProps
,
FlexProps
,
View
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
,
BackgroundProps
totalLines
Maps to react-native TextInput's numberOfLines.
Type: number
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the textArea
here
.
Info: We can easily extend the textArea component theme using extendTheme function as described in the documentation
here
.
Previous
Switch
Next
Badge
Quick Nav
Examples
Usage
Invalid and Disabled TextArea
Value Controlled TextArea
Props
Styling
MadeWithNativeBase
gluestack-ui
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.