Anchor

Link to external websites

Anchor adds Tamagui style props and cross-platform behavior to links.

Features

  • Server rendering support

  • Native and web support

  • Full Tamagui style props

Installation

Anchor is already installed in tamagui:

Usage

Anchor extends SizableText, adding the href, target, and rel attributes.

On native, it uses React Native Linking.openURL. On web, it renders an a element with href set appropriately.

API reference

Anchor

Inherits Tamagui props as well as:

Props

  • href

    string

    The URL to link to.

  • target

    string

    Specifies where to open the linked document.

  • rel

    string

    Specifies the relationship between the current document and the linked document.