Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
3.5K
-20.67%
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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.