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

react-ui-flex-cards

v1.0.8

Published

Expandable card components for React, based on reaxt-ui-cards by @nukeop

Downloads

2

Readme

react-flex-ui-cards

Humble and quick custom variations on react-ui-cards by @nukeop with a little help from react-player by @CookPete - for a blog project. Planning to contribute to react-ui-cards where applicable, but contributions here are definitely welcome.

Basic additions were border-radius, predetermined widths, a "navigation" card, a video card, a figure card (photo or diagram with white-background text instead of overlay).

Suggested changes to the original package will most likely entail making more props available on the existing components to build the ones I've added here, for dryness and clarity.

npm

https://www.npmjs.com/package/react-flex-ui-cards

Installation

$ yarn add react-ui-flex-cards
$ npm install --save react-ui-flex-cards

Development

Getting started

After cloning the repo, run the following commands to start the project in development mode with hot reload:

$ yarn
$ yarn run dev

Card types

Video card (added)

Video player using react player library, tested with YouTube and Vimeo sources https://www.npmjs.com/package/react-player

| attribute | type | description | | --------- | ------ | ----------------------- | | src | string | Valid video content url | | width | string | css width value | | height | string | css height value |

Nav cards

Sticky user-based nav bars with menu option and collapsing banner image and avatar on scroll

| attribute | type | description | | ----------- | ---------------- | ------------------------------------------------- | | avatar | string | url of user image | | cardClass | string | 'banner' or 'wide' | | header | string | url of header background | | githubUrl | string | a short description of the product | | twitterUrl | integer | rating of the product (0-5). Not implemented yet. | | linkedInUrl | string | url the 'buy now' button will link to | | menu | array of objects | name and url keys as strings |

Usage:

div style={{ position: 'sticky', top: '10px', zIndex: 33 }}>
        <NavCard
          githubUrl='https://github.com/dfrho'
          twitterUrl='https://twitter.com/rhodesdav'
          linkedInUrl='https://www.linkedin.com/in/rhodesdavid'
          cardClass='card banner'
          header='https://i.imgur.com/w5tX1Pn.jpg'
          avatar='https://i.imgur.com/uDYejhJ.jpg'
          name='Justin Case'
          positionName='Software Developer'
          menu={[
            {
              name: 'home',
              route: '/'
            },
            {
              name: 'blog',
              route: '/blog'
            },
            {
              name: 'projects',
              route: '/projects'
            }
          ]}
        />
      </div>

User cards

Cards representing users or people with the addition of a social icon bar instead of stats (followers, etc.)

| attribute | type | description | | ------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | cardClass | string | additional CSS classes you might want to apply to the Card. Putting 'float' here will enable an on-hover animation. 'banner' is 750px max width, 'block' is 350px width | | href | string/null | optional url the card will link to when clicked | | header | string | url to the image that will be displayed in the upper part of the card | | avatar | string | url to the image that will be displayed in the center of the card | | name | string | user's name | | positionName | string | user's role | | twitterUrl | string | optional url of user twitter feed | | linkdInUrl | string | optional url of user LinkdIn feed | | githubUrl | string | optional url of user github feed |

Product cards

Cards representing products available for purchase.

| attribute | type | description | | ----------------- | ------- | ------------------------------------------------------------- | | photos | array | array of urls to photos of the product | | price | string | the price that will be displayed in the upper lefthand corner | | productName | string | name of the product | | description | string | a short description of the product | | rating | integer | rating of the product (0-5). Not implemented yet. | | url | string | url the 'buy now' button will link to | | className (added) | string | 'banner', and 'block' signifying widths |

News header card

Cards you can use on the news site, shows the title, author and date it was published. Click on image to see the exact news.

| attribute | type | description | | ----------------- | ----------- | --------------------------------------------------------- | | href | string/null | optional url the card will link to when clicked | | thumbnail | string | url to the image that will be displayed in the background | | author | string | author of aricle linked in href | | date | string | date of publishing | | className (added) | string | 'roadblock', 'banner', and 'block' signifying widths | |