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

Link | 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.
Link
Links are accessible elements used primarily for navigation. This component is styled to resemble a hyperlink.
Show Code
Playground
const Example = () => {
return <Link mt={4} href="https://docs.nativebase.io" isExternal>
Click here to open documentation.
</Link>;
};
Import
Copy
import { Link } from 'native-base';
Examples
Basic
Playground
const Example = () => {
return <Box alignItems="center">
<Link href="https://nativebase.io">
Click here to open documentation.
</Link>
</Box>;
};
External Link
Playground
const Example = () => {
return <Box alignItems="center">
<Text mx="16">
NativeBase is a component library that enables devs to build universal
design systems. It is built on top of React Native, allowing you to
develop apps for Android, iOS and the Web.{" "}
<Link href="https://nativebase.io" isExternal _text={{
color: "blue.400"
}} mt={-0.5} _web={{
mb: -2
}}>
Read More
</Link>
</Text>
</Box>;
};
Link with Underline
Playground
const Example = () => {
return <Box alignItems="center">
{
/* @ts-ignore */
}
<Link _text={{
fontSize: "xl",
_light: {
color: "cyan.500"
},
color: "cyan.300"
}} href="https://nativebase.io" isUnderlined _hover={{
_text: {
_light: {
color: "cyan.600"
},
color: "cyan.400"
}
}}>
Click me to open NativeBase website.
</Link>
</Box>;
};
Link custom onPress
Playground
const Example = () => {
const [state, setState] = React.useState(false);
const toggleState = () => {
setState(!state);
};
return <Box alignItems="center">
<Box h="100" w="100" bg={state ? "emerald.500" : "indigo.500"} />
<Link onPress={toggleState} mt="8">
<Box px="3" py="2" bg="primary.400" rounded="sm" _text={{
color: "white",
fontWeight: "medium"
}}>
Change Color
</Box>
</Link>
</Box>;
};
Link around containers
Playground
const Example = () => {
return <Box alignItems="center">
<Link href="https://nativebase.io" isExternal>
<Box w={[64, 96]} borderWidth="1" borderColor="coolGray.300" shadow="3" bg="coolGray.100" p="5" rounded="8">
<HStack alignItems="center">
<Badge colorScheme="darkBlue" _text={{
color: "white"
}} variant="solid" rounded="4">
Open Source
</Badge>
<Spacer />
<Text fontSize={10} color="coolGray.800">
2020
</Text>
</HStack>
<Text color="coolGray.800" mt="3" fontWeight="medium" fontSize="xl">
NativeBase v3
</Text>
<Text mt="2" fontSize="sm" color="coolGray.700">
NativeBase is a component library that enables devs to build
universal design systems.
</Text>
<Flex>
<Text mt="2" fontSize={12} fontWeight="medium" color="darkBlue.600">
Read More
</Text>
</Flex>
</Box>
</Link>
</Box>;
};
Props
Link implements
View
,
SafeAreaProps
,
PlatformProps
,
FlexProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
href
URL that should be opened on Link press
Type: string
size
Size of the link
Type: number | "sm" | "md" | "xl" | "lg" | "2xl" | "xsm"
isUnderlined
Whether Link text should be underlined
Type: boolean
isHovered
Whether Link text should be hovered
Type: boolean
onPress
Callback that will be invoked on Link press
Type: (event?: GestureResponderEvent) => any
isExternal
If true, link will be opened in new tab on web. It uses _target property to achieve this
Type: boolean
_hover
Hover props. Accepts all styled system props.
Type: Omit<Partial<ILinkProps>, "_hover">
wrapperRef
Ref to be attached to the Link wrapper
Type: MutableRefObject<any>
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the link
here
.
Info: We can easily extend the link component theme using extendTheme function as described in the documentation
here
.
Accessibility
Adheres to the
Link WAI-ARIA design pattern.
Previous
Input
Next
Radio
Quick Nav
Import
Examples
Basic
External Link
Link with Underline
Link custom onPress
Link around containers
Props
Styling
Accessibility
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.