--- title: gluestack-ui Link Component | React Native Link Installation description: Enhance navigation with a React Native link component. Seamless UI link design for intuitive user experiences. Learn more! pageTitle: Link pageDescription: Enhance navigation with a React Native link component. Seamless UI link design for intuitive user experiences. Learn more! showHeader: true --- import { Tabs, TabItem } from '@/docs-components/tabs'; import { Table, TableHeader, TableCell, TableHeaderCell, TableBody, TableRow, } from '@/docs-components/table'; import { InlineCode } from '@/docs-components/inline-code'; # 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. /// {Example:basic} /// ## Installation ### Run the following command: ### Step 1: Copy and paste the following code into your project. ```tsx %%-- File: src/components/ui/link/index.tsx --%% ``` ### Step 2: Update the import paths to match your project setup. ## API Reference To use this component in your project, include the following import statement in your file. ```ts import { Link } from '@/components/ui/link'; ``` ```ts export default () => ( ); ``` ### 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](https://reactnative.dev/docs/pressable) component. <> Platform Output Web {``} Native {``}
### Props <> Prop Type Default Description href string - URL that should be opened on Link press onPress (event?: GestureResponderEvent) => any - Callback that will be invoked on Link press isExternal boolean false If true, link will be opened in new tab on web isHovered boolean false When true, the link displays a hover state isFocusVisible boolean false To manually set focus visible state to the link size xs | sm | md | lg | xl | 2xl | 3xl | 4xl | 5xl | 6xl md The 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](https://www.w3.org/WAI/ARIA/apg/patterns/link/). #### 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. /// {Example:default} /// /// {Example:with-icon} ///