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 — Text | NativeBase | Universal Components for React and React Native

Text | 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.
Text
Text allows the rendering of text and paragraphs within an interface.
Show Code
Playground
const Example = () => {
return <Text>This is Text.</Text>;
};
Examples
ChangingFontSize
Playground
const Example = () => {
return <VStack space={1} alignItems="center">
<Text fontSize="xs">xs</Text>
<Text fontSize="sm">sm</Text>
<Text fontSize="md">md</Text>
<Text fontSize="lg">lg</Text>
<Text fontSize="xl">xl</Text>
<Text fontSize="2xl">2xl</Text>
<Text fontSize="3xl">3xl</Text>
<Text fontSize="4xl">4xl</Text>
<Text fontSize="5xl">5xl</Text>
<Text fontSize="6xl">6xl</Text>
</VStack>;
};
Truncated
Playground
const Example = () => {
return <Text isTruncated maxW="300" w="80%">
NativeBase gives you a contrasting color based on your theme. You can also
customise it using the useAccessibleColors hook.
</Text>;
};
Nested
Playground
const Example = () => {
return <Text italic>
<Text bold>Taj Mahal</Text> is in Agra.
</Text>;
};
Overridden
Playground
const Example = () => {
return <VStack space={2} alignItems="center">
<Text bold>Bold</Text>
<Text italic>Italic</Text>
<Text underline>Underline</Text>
<Text highlight _dark={{
color: "coolgray.800"
}}>
Highlighted
</Text>
<Text>
H<Text sub>2</Text>O
</Text>
<Text underline>Underline</Text>
<Text strikeThrough>StrikeThrough</Text>
<Text bold italic underline>
Bold, Italic & Underline
</Text>
</VStack>;
};
Props
Text implements
PlatformProps
,
FlexProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
ShadowProps
,
PositionProps
,
BackgroundProps
,
TextProp
children
Renders components as Text children. Accepts a JSX.Element or an array of JSX.Element.
Type: ReactNode
fontSize
The size of font
Type: ResponsiveValue<number | "sm" | "2xs" | "xs" | "md" | "xl" | "3xl" | "5xl" | "lg" | "6xl" | "7xl" | "4xl" | "2xl" | (string & {}) | "8xl" | "9xl">
letterSpacing
Letter spacing
Type: ResponsiveValue<number | "sm" | "xs" | "md" | "xl" | "lg" | "2xl" | (string & {})>
lineHeight
Line height
Type: ResponsiveValue<number | "sm" | "2xs" | "xs" | "md" | "xl" | "3xl" | "5xl" | "lg" | "4xl" | "2xl" | (string & {})>
fontWeight
Font weight
Type: ResponsiveValue<number | "bold" | "medium" | (string & {}) | "hairline" | "thin" | "light" | "normal" | "semibold" | "extrabold" | "black" | "extraBlack">
font
Fonts
Type: ResponsiveValue<IFont>
noOfLines
Used to truncate text at a specific number of lines
Type: number
bold
Used to make the text bold.
Type: boolean
isTruncated
If true, it will render an ellipsis when the text exceeds the width of the viewport or maxWidth set.
Type: boolean
italic
Used to make the text italic.
Type: boolean
underline
Used to underline the text.
Type: boolean
strikeThrough
A horizontal line through the center of the text.
Type: boolean
sub
Text will have smaller font size.
Type: boolean
highlight
Used to highlight the text with a yellow background.
Type: boolean
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the text
here
.
Info: We can easily extend the text component theme using extendTheme function as described in the documentation
here
.
Previous
Toast
Next
Heading
Quick Nav
Examples
ChangingFontSize
Truncated
Nested
Overridden
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.