šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

@flyerhq/react-native-link-preview

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flyerhq/react-native-link-preview

Fully customizable preview of the URL extracted from the provided text.

1.6.0
latest
npm
Version published
Weekly downloads
4.8K
16.1%
Maintainers
1
Weekly downloads
Ā 
Created
Source

npm build Maintainability Test Coverage type-coverage

Fully customizable preview of the URL extracted from the provided text.

Getting Started

yarn add @flyerhq/react-native-link-preview

Usage

import { LinkPreview } from '@flyerhq/react-native-link-preview'
// ...
return (
  <LinkPreview text='This link https://github.com/flyerhq can be extracted from the text' />
)

Props

Required

NameTypeDescription
textstringText to extract the link from

Optional

NameTypeDescription
containerStyleViewStyleTop level container style
enableAnimationbooleanEnables LayoutAnimation
headerstringText above the link
metadataContainerStyleViewStyleTitle, description and minimized image container style
metadataTextContainerStyleViewStyleTitle and description container style
onPreviewDataFetched(PreviewData) => voidCallback to get the fetched preview data
previewDataPreviewDataData to render instead of parsing the provided text
renderDescription(string) => ReactNodeCustom description render prop
renderHeader(string) => ReactNodeCustom header render prop
renderImage(PreviewDataImage) => ReactNodeCustom image render prop
renderLinkPreview({ aspectRatio?: number, containerWidth: number, previewData?: PreviewData }) => ReactNodeCustom render prop
renderMinimizedImage(PreviewDataImage) => ReactNodeCustom minimised image render prop
renderText(string) => ReactNodeCustom provided text render prop
renderTitle(string) => ReactNodeCustom title render prop
requestTimeoutnumberTimeout after which request to get preview data should abort
textContainerStyleViewStyleText, title, description and minimized image container style
touchableWithoutFeedbackPropsTouchableWithoutFeedbackPropsTop level touchable props

License

MIT

Keywords

link

FAQs

Package last updated on 27 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts