Socket
Book a DemoInstallSign in
Socket

react-ui-cards-src

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ui-cards-src

Various card components for React

0.0.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

react-ui-cards

This module is porting This library to use as components within react. Not bundled by webpack. For original Authors work, please see here https://www.npmjs.com/package/react-ui-cards

Various stylish card components for React. Focused on being ready to use with little modifications. Supply your data and you're good to go.

Live demo

https://nukeop.github.io/react-ui-cards/

npm

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

Installation

$ npm install --save react-ui-cards

Development

Getting started

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

$ npm install

$ npm run dev

Contributing

All contributions are welcome. You can either add something to existing cards, or create a completely new card type.

Card types

User cards

Cards representing users or people.

attributetypedescription
cardClassstringadditional CSS classes you might want to apply to the Card. Putting 'float' here will enable an on-hover animation.
hrefstring/nulloptional url the card will link to when clicked
headerstringurl to the image that will be displayed in the upper part of the card
avatarstringurl to the image that will be displayed in the center of the card
namestringuser's name
positionNamestringuser's role
statsarray/nullan optional array of objects with attributes 'name' and 'value' - this is displyed in the card's footer

User card

Product cards

Cards representing products available for purchase.

attributetypedescription
photosarrayarray of urls to photos of the product
pricestringthe price that will be displayed in the upper lefthand corner
productNamestringname of the product
descriptionstringa short description of the product
ratingintegerrating of the product (0-5). Not implemented yet.
urlstringurl the 'buy now' button will link to

Product card

Tagged content cards

Cards showcasing any content that can be described with a single thumbnail and a list of tags.

attributetypedescription
hrefstring/nulloptional url the card will link to when clicked
thumbnailstringurl to the image that will be displayed in the center part of the card and as the background
titlestringtitle of the card
descriptionstringshort description of the content, try to not exceed one line
tagsarray/nullan array of strings that will be converted to pill-style tags and displayed in the lower righthand corner of the card

Tagged content card

Flipping card

A card with a front and back side. Flips over on hover. Any React component can be displayed on either side.

This card is a bit different than the other ones - it has no attributes. To define it, you have to create a nested structure and pass your content as children:

    <FlippingCard>
        <FlippingCardBack>
  		  Content that will be displayed on the back of the card
  	  </FlippingCardBack>
  	  <FlippingCardFront>
  		  Content that will be displayed on the front of the card
  	  </FlippingCardFront>
  </FlippingCard>

See demo page for an example in action.

Recipe card

Cards you can use to show dishes' names, time they take to cook and how big the portions are. Heart sign can be used as "Add to favorite" button.

attributetypedescription
hrefstring/nulloptional url the card will link to when clicked
thumbnailstringurl to the image that will be displayed at the top of other elements
titlestringname of the dish
timestringamount of time it will take to prepare the dish
servingsstringestimation of portions' size

Recipe card

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.

attributetypedescription
hrefstring/nulloptional url the card will link to when clicked
thumbnailstringurl to the image that will be displayed in the background
authorstringauthor of aricle linked in href
datestringdate of publishing
tagsstringoptional. array of string to be rendered as tags

News header card

Cryptocurrency card

Cards that show cryptocurrency-related data, including a chart. Can be used for showing other data, such as fiat currency or stock market prices.

attributetypedescription
currencyNamestringName of the cryptocurrency
currencyPricestringCurrent price, displayed as provided, which means you have to format it yourself
iconnodeIcon representing the currency, it's displayed at 24x24 px
currencyShortNamestringSymbol such as BTC, ETH, etc
trendstringRecent price change. Just as with the price, no formatting is performed
trendDirectioninteger(-1, 0, 1)Indicates whether the trend is positive, negative, or if there's no change
chartColorstringColor of the line on the chart
chartDataarray[integer]An array of integer values to be displayed on the chart

Cryptocurrency card

Payment card

Card that represents a credit card, a debit card, or other similar cards. Flips on hover to reveal the back.

attributetypedescription
backgroundstringValid CSS background string. If not provided, a default background is used.
backgroundPatternstring/nullLets you select one of the patterns to display in the background. Can be either "worldMap", "triangles", or "spiral". Null results in no pattern being displayed
issuerIconstring/elementCard issuer icon. Either a link to the image with an icon, or a React element to render
numberstringPayment card number
datestringThe "valid thru" date
namestringName displayed on the card
cvvstringCVV code displayed on the back of the card

Payment cards

Keywords

react

FAQs

Package last updated on 25 Feb 2019

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.