Giter VIP home page Giter VIP logo

react-tiny-link's Introduction

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
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

๐Ÿ’ป ๐Ÿ›

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

License

MIT

Twitter Follow

react-tiny-link's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar hitesh399 avatar hiteshsingsys avatar srghma avatar vadymmoiseyenkoagiliway avatar vladimirmoushkov avatar winhtaikaung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.