All Projects → winhtaikaung → React Tiny Link

winhtaikaung / React Tiny Link

Convert your links into rich previews

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Tiny Link

Sdk
Make any URL embeddable. Turn any URL into a beautiful link preview.
Stars: ✭ 446 (+131.09%)
Mutual labels:  preview, cards
svelte-link-preview
Svelte port of @dhaiwat10/react-link-preview
Stars: ✭ 12 (-93.78%)
Mutual labels:  link, preview
Hearthstone Db
A JSON collection of all Hearthstone cards. Hearthstone database.
Stars: ✭ 117 (-39.38%)
Mutual labels:  cards
Django Herald
A Django messaging library
Stars: ✭ 159 (-17.62%)
Mutual labels:  preview
Magnetx
资源搜索型软件 macOS OSX magnet
Stars: ✭ 1,819 (+842.49%)
Mutual labels:  link
Plantuml Previewer.vim
Vim / Neovim plugin for preview PlantUML
Stars: ✭ 119 (-38.34%)
Mutual labels:  preview
Gatsby Source Prismic Graphql
Gatsby source plugin for Prismic GraphQL
Stars: ✭ 144 (-25.39%)
Mutual labels:  preview
Next Sanity
Sanity.io toolkit for Next.js
Stars: ✭ 115 (-40.41%)
Mutual labels:  preview
React Native Card Flip
Card flip animation for React Native
Stars: ✭ 183 (-5.18%)
Mutual labels:  cards
Atom Asciidoc Preview
⚛ AsciiDoc preview for the Atom editor.
Stars: ✭ 136 (-29.53%)
Mutual labels:  preview
Linkit
Multi-purpose link plugin for Craft CMS
Stars: ✭ 155 (-19.69%)
Mutual labels:  link
Swipeablecards
Stars: ✭ 136 (-29.53%)
Mutual labels:  cards
Vue Live
A component to demo components, inspired by react-live
Stars: ✭ 123 (-36.27%)
Mutual labels:  preview
Niui
Lightweight, feature-rich, accessible front-end library
Stars: ✭ 152 (-21.24%)
Mutual labels:  cards
Glabels Qt
gLabels Label Designer (Qt/C++)
Stars: ✭ 116 (-39.9%)
Mutual labels:  cards
Gatsby Source Sanity
Gatsby source plugin for building websites using Sanity.io as a backend.
Stars: ✭ 160 (-17.1%)
Mutual labels:  preview
Flutter Adaptivecards
AdaptiveCards for Flutter 🐦
Stars: ✭ 117 (-39.38%)
Mutual labels:  cards
Hellocamera2
Android 自定义相机: 可定制的 UI, 压缩到指定分辨率级别, 裁剪指定区域, 大图预览. (Android custom camera: Customizable UI, compress to specific resolution level, clip specific area programmatically, picture preview, usage of Camera / Camera2 API.)
Stars: ✭ 134 (-30.57%)
Mutual labels:  preview
Uicard
Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire...
Stars: ✭ 142 (-26.42%)
Mutual labels:  cards
Link Prevue
Vue component for generate a link preview
Stars: ✭ 186 (-3.63%)
Mutual labels:  preview

React-Tiny-Link

Convert your links into beautiful previews

Yet anotherReact link preview component with cards for web without a specific backend.

npm version npm GitHub code size in bytes NPM

All Contributors

NPM

CORS enabled?

No. You may need a CORS proxy to use this component. But if you dont have one, we made the component to use https://cors-anywhere.herokuapp.com as default proxy. Thanks to Rob. It saves my time for accessing urls.

Installation


npm install --save react-tiny-link

Usage & Configuration

import { ReactTinyLink } from 'react-tiny-link'
;<ReactTinyLink
  cardSize="small"
  showGraphic={true}
  maxLine={2}
  minLine={1}
  url="https://www.amazon.com/Steve-Madden-Mens-Jagwar-10-5/dp/B016X44MKA/ref=lp_18637582011_1_1?srs=18637582011&ie=UTF8&qid=1550721409&sr=8-1"
/>

Props & methods

PropName Description PropType value required
url URL to be display as preview string true
cardSize Size of the card string default (small) small,large false
maxLine Maximum number of line to ellipsis number 2 false
minLine Minimum number of line to ellipsis number 1 false
width Width of the link preview card number default(100vw) false
header Default Header content string null false
description Default description content string null false
proxyUrl Proxy URL to pass that resolve CORS string default(https://cors-anywhere.herokuapp.com) false
showGraphic Boolean value to display graphics boolean default(true) false
autoPlay Boolean value to play the media if provided url is video boolean default(false) false
defaultMedia Default value to provide the media for failure cases string N.A false
noCache Disables cache of link result boolean default(false) false
onError Error callback on when the url failed to fetch onError(error:Error) N.A false
onSuccess Success callback on when the url was fetched successfully onSuccess(data:IResponseData) N.A false
onClick Click event which will allow to add custom implementation onClick event if it was not provided the component itself will render as <a></a>. onClick(e:Event,data:IResponseData) default(null) false
loadSecureUrl Load only secure ( https:// ) resources. If no secure resource was found, then don't render the <img> and <video> element boolean default(false) false
requestHeaders Request headers that will override the fetch headers Record<string, string>; default(false) false

Hook usage

import { useScrapper } from 'react-tiny-link'

const [result, loading, error] = useScrapper({
  url:
    'https://www.amazon.com/Steve-Madden-Mens-Jagwar-10-5/dp/B016X44MKA/ref=lp_18637582011_1_1?srs=18637582011&ie=UTF8&qid=1550721409&sr=8-1',
})

Params

PropName Description PropType value required
url URL to be display as preview string true
proxyUrl Proxy URL to pass that resolve CORS string default(https://cors-anywhere.herokuapp.com) false
defaultMedias Default value to provide the media for failure cases string[] N.A false
defaultValue Default response to provide for failure cases IReactTinyLinkData N.A false
noCache Disables cache of link result boolean default(false) false
onError Error callback on when the url failed to fetch onError(error:Error) N.A false
onSuccess Success callback on when the url was fetched successfully onSuccess(data:IResponseData) N.A false

Demo App &

CodeSandbox

Edit React Tiny Link

Contributing

  1. Fork it

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Added some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create new Pull Request

Contributors

Thanks goes to these wonderful people (emoji key):


Vladimir Moushkov

💻

Serhii Khoma

💻 🐛

Hitesh Kumar

💻 🐛

VadymMoiseyenkoAgiliway

💻 🐛

nastikue

🐛

sndsabin

💻 🐛

Aviskar KC

🐛 💻

Alexandre Bernard

🐛 💻

Liz

💻 💡

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

Twitter Follow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].