Skip to content

react native text parser and link previewer npm package, it makes a preview from an url, grabbing all the information such as title, relevant texts and images.

License

Notifications You must be signed in to change notification settings

maherzaidoune/react-native-url-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-url-preview 🐜

NPM

Parses text and wraps URLs , transform the url to a beautiful link preview

Getting started 🐜

$ npm install react-native-url-preview --save

Usage 🐜

import RNUrlPreview from 'react-native-url-preview';

<RNUrlPreview text={"any text to be parsed , https://www.youtube.com/watch?v=Kmiw4FYTg2U"}/>

Examples🐜

Please refer to the react-native-url-preview example provided to see how react-native-url-preview can be used .

Demo🐜

   

Customization 🐜

Parameter Required? Default Type Description
text YES Null string The text that is parsed and where the URL is retrieved
title NO True Boolean determine whether the URL title is displyed or not
description NO True Boolean determine whether the URL description is displyed or not
titleStyle NO defaultStyle style self explanatory i believe
containerStyle NO defaultStyle style you can pass a custom container style
imageStyle NO defaultStyle style you can pass a custom image style
faviconStyle NO defaultStyle style you can pass a custom favicon style
textContainerStyle NO defaultStyle style you can pass a custom style for the text container
descriptionStyle NO defaultStyle style self explanatory i believe
titleNumberOfLines NO 2 number self explanatory i believe
descriptionNumberOfLines NO Ipad?4:3 number self explanatory i believe
imageProps NO { resizeMode: "contain"} object you can pass a custom props to image
requestOptions NO {} object pass additional options to url preview request
onLoad NO () => {} function callback called when url preview data is loaded
onError NO () => {} function callback called if url preview fails to load

Credits 🐜

About

react native text parser and link previewer npm package, it makes a preview from an url, grabbing all the information such as title, relevant texts and images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published