gluestack-ui logo
Get Updates
Prompt to React Native UI
Home
Components
Hooks
Apps
MCP Server
Guides
Home
Overview
IntroductionQuick Start
Getting Started
InstallationTooling SetupVS Code ExtensionsFigma UI KitCLIgluestack-ui-nativewind-utils
Core Concepts
AccessibilityUniversal
Performance
Benchmarks
Theme Configuration
Default TokensCustomizing ThemeDark Mode
Components
All Components
Typography
HeadingrscTextrsc
Layout
BoxrscCenterrscDividerHStackrscVStackrscGridalpha, rsc
Feedback
AlertProgressSpinnerToast
Data Display
BadgeCardrscTablealpha
Forms
ButtonCheckboxFormControlInputLinkPressableRadioSelectSliderSwitchTextarea
Overlay
AlertDialogDrawerMenuModalPopoverPortalTooltip
Disclosure
ActionsheetAccordionBottomSheetalpha
Media And Icons
AvatarImageIconrsc
Others
FabSkeletonalpha, rsc
Hooks
useBreakPointValue
useMediaQuery
Apps
Dashboard App
Kitchensink App
Todo App
Starter Kit
MCP Server
MCP Server
Guides
Recipes
LinearGradient
Tutorials
Building Ecommerce App
More
Upgrade to v2Upgrade to v3FAQsReleasesRoadmapTroubleshootingDiscord FAQs

Link

Enhance navigation with a React Native link component. Seamless UI link design for intuitive user experiences. Learn more! This is an illustration of Link component.

Installation

Run the following command:

npx gluestack-ui add link

API Reference

To use this component in your project, include the following import statement in your file.
import { Link } from '@/components/ui/link';
export default () => (
  <Link>
    <LinkText />
  </Link>
);

Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

Link

Contains all link related layout style props and actions. It inherits all the properties of React Native's Pressable component.
PlatformOutput
Web
<a />
Native
<Pressable />

Props

PropTypeDefaultDescription
href
string-URL that should be opened on Link press
onPress
(event?: GestureResponderEvent) => any-Callback that will be invoked on Link press
isExternal
booleanfalseIf true, link will be opened in new tab on web
isHovered
booleanfalseWhen true, the link displays a hover state
isFocusVisible
booleanfalseTo manually set focus visible state to the link
size
xs | sm | md | lg | xl | 2xl | 3xl | 4xl | 5xl | 6xlmdThe size of the link

Features

  • Keyboard support for actions
  • Support for hover and focus states
  • Option to add your styles or use the default styles

Accessibility

We have outlined the various features that ensure the Link component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards. Adheres to the WAI-ARIA design pattern.

Keyboard

  • Tab
    : Moves focus to the next focusable element
  • Enter
    : Users should be able to open a link

Screen Reader

  • VoiceOver: When a link receives focus, screen readers should announce a descriptive link name

Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

Default Link

Link with Icon

Edit this page on GitHub
Go backInput
Up nextPressable
Go backInput
Up nextPressable