3.1.1 • Published 3 years ago

react-responsive-cards v3.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

react-responsive-cards

A React library to quickly build a responsive grid of cards.

NPM JavaScript Style Guide

Demo

View demo here

Material UI

React responsive cards is built using material-ui as a peer dependency. The consuming app should also install the following:

npm install @material-ui/core --save
npm install @material-ui/icons --save

Note - that react-responsive-cards will work with material ui components. For example, it will take a material ui component and build the card footer.

Install

npm install --save react-responsive-cards

Usage

import React from 'react'

import { Cards } from 'react-responsive-cards'

const App = () => {
  const details = [
    {
      title: 'The Card Title',
      description: 'This is a short description',
      image: 'https://<image_here>.jpg',
      renderFooter: <div>{'Custom JSX'}</div>,
      handleOnClick: () => alert('Custom Event')
    }
  ]

  return <Cards details={details} />
}

export default App

Props

PropNameisRequiredTypeDescription
detailsyesObject[]An array of objects that build up the card details
imagenosringCard image
renderFooternoJSXAllows custom JSX to generate footer
handleOnClicknoFnAllows a user to set event handler on entire card

License

MIT © ChaseHardin

3.1.1

3 years ago

3.1.0

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago