npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@develevate/react-preview-link

v0.1.7

Published

![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)

Downloads

49

Readme

React URL Preview Component

GitHub license

A React component that displays a preview of a URL and acts as a clickable link to redirect users to the provided website.

Table of Contents

Demo

Check out the live demo to see the component in action.

Installation

Install the component via npm:

npm install @develevate/react-preview-link

OR via yarn

yarn add @develevate/react-preview-link

Usage

Import the component in your React application and use it within your components:

import React from 'react';
import {PreviewLink} from '@develevate/react-preview-link';

function App() {
  return (
    <div>
      <PreviewLink url="https://example.com" />
    </div>
  );
}

Props

The PreviewLink component accepts the following props:

  • href (string, required): The URL to be previewed and linked.
  • showHoverOverlay (boolean, optional): If true renders an overlay over the preview link component | @default true
  • showHoverAnimation (boolean, optional): If true adds hover animation of popping out over the preview link | @default true
  • height (number, optional): Height of the preview link component | @default 180
  • width (number, optional): Width of the preview link component | @default 320

Examples

Here are a few examples demonstrating different use cases:

<div>
  <PreviewLink url="https://example.com" />
  <PreviewLink url="https://example.com" className="custom-preview" />
</div>

Feel free to explore more customization options using the CSS file used for styling here.

Contributing

Contributions are welcome! Follow these steps to contribute to the project:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Make your changes and submit a pull request.
  • Please ensure your code adheres to the existing coding standards.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.