1.1.9 β’ Published 5 years ago
react-native-url-preview v1.1.9
react-native-url-preview π
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 |
| 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 |
| onLoad | NO | () => {} | function | callback called when url preview data is loaded |
| onError | NO | () => {} | function | callback called if url preview fails to load |
Credits π
- Thanks to marouan frih for the REGEX
- extract information from a URL with link-preview-js
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.9
6 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.0
7 years ago
