HomeOur TeamContact

Hyper Link Prompt

By Utkarsh Lubal
Published in Text
June 13, 2022
1 min read
Hyper Link Prompt

Table Of Contents

01
Introduction
02
Installation
03
Example
04
Tutorial

Introduction

A Hyperlink component for react-native & react-native-web that makes urls, fuzzy links, emails,etc clickable

Installation

npm i --save react-native-hyperlink

Example


import React from 'react';
import { StyleSheet, Text, SafeAreaView } from 'react-native';
import Hyperlink from 'react-native-hyperlink'

const App = () => {
  return(
    <SafeAreaView style={styles.container}>

      <Text style={styles.sectionTitle}>
            Hyper link Prompt    
</Text>
        <Hyperlink linkStyle={{color: 'blue' ,fontSize:22}}
        onPress={ (url, text) => alert ('You Clicked on Link ') }>
        <Text style={styles . sectionDes}>
        https://awereactnative.com/
        </Text>
        </Hyperlink>

    </SafeAreaView>
  );
};
export default App;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingHorizontal: 20
  },
  sectionTitle: {
    fontSize: 25,
    fontWeight: '600',
    marginTop: 30
  },
  sectionDes: {
    marginTop: 8,
    fontSize: 22,
    fontWeight: '400'
  }
  });

Tutorial


Previous Article
Keyboard Spacer
Next Article
Hyper Link
Utkarsh Lubal

Utkarsh Lubal

Full Stack Developer

Related Posts

Text Size
Text Size
June 29, 2022
5 min

Quick Links

Advertise with usAbout UsContact Us

Social Media