Cards for React

Updated on May 17, 2021

Cards component for rendering any type of content: photos, text, video and forms in a consistent way.

Use it for organizing content and provide entry points with optional actions.

Shipping with useful features for creating effective layouts:

  • Built from three blocks: header, content & footer
  • Fully supports typograpy elements & classes
  • Thumbnail, avatar, inline & cover image support
  • Integrates with horizontal scroll view and list view
  • Multiple theme support
  • Lightweight footprint
  • RTL Support
  • Supports card collections



As part of Gesture enabled listview it can be picked up with the Framework and Complete licenses or with the component license.


Cards demos available for other frameworks.

Viewing demos & code for

React Cards Stacked cards

Swipe cards away left or right to clear stack.
    • Best places to seek silence
      The Dhamma Giri, a vipassana meditation retreat.
    • Best animal adventure
      A young panda tests his climbing skills at the Chengdu Research Base.
    • Best places to test your survival skills
      A view across the Turnagain Arm on Alaska's Kenai Peninsula.
    • Most accessible destinations
      The impressive Mayan site of Chichén Itzá.
    • The world’s most extraordinary sleepovers
      Explore the azure depths with a stay at the Manta Resort's underwater room.
    Swipe cards away for cyclic movement.
      • Best places to seek silence
        The Dhamma Giri, a vipassana meditation retreat.
      • Best animal adventure
        A young panda tests his climbing skills at the Chengdu Research Base.
      • Best places to test your survival skills
        A view across the Turnagain Arm on Alaska's Kenai Peninsula.
      • Most accessible destinations
        The impressive Mayan site of Chichén Itzá.
      • The world’s most extraordinary sleepovers
        Explore the azure depths with a stay at the Manta Resort's underwater room.

      Cards - Basic

      Change demo
      Basic
      React Cards demo with header, content, footer blocks, basic typography and card actions. With source code. For React and Ionic React.
      Copy code

      Cards - Images

      Change demo
      Images

      Display images inside cards in a couple of different ways. Place it as a cover, make it full-width, inset images or use them as thumbnails.

      Place the cards in a grid system, make them scrollable horizontally or create a tinder-like swipe away layout.

      Copy code

      Cards - Video

      Change demo
      Video
      React Cards demo showing off how to include videos with and without description. Content can be shown around media cards. For React and Ionic React.
      Copy code

      Cards - Lists

      Change demo
      Lists
      React Cards demo that contains gesture enabled checklist and hierarchical listview. Add or remove elements from the list. For React and Ionic React.
      Copy code

      Cards - Social cards

      Change demo
      Social cards
      React social cards demo with avatar, name, timestamp, photos, text and various actions. Build custom templates. For React and Ionic React.
      Copy code

      Cards - Forms

      Change demo
      Forms
      React Cards demo with various form elements. Add text fields, selects, checkboxes, sliders, switch, radio, buttons & more. For React and Ionic React.
      Copy code

      Cards - Swipe away

      Change demo
      Swipe away
      React Notification card demo. Use it like notification center or google now. Swipe away to clear. With source code. For React and Ionic React.
      Copy code

      Cards - Stacked cards

      Change demo
      Stacked cards
      React Stacked and rotated cards with tinder-like swipe away interaction. Use cards with listview gestures and custom CSS. For React and Ionic React.
      Copy code
      import mobiscroll from '@mobiscroll/react';
      import '@mobiscroll/react/dist/css/mobiscroll.min.css';
      
      class ListItem extends React.Component {
          render() {
              const classes = (this.props.item.id % 2 == 0 ? 'custom-card-rotate-right' : (this.props.item.id % 3 == 0 ? 'custom-card-rotate-left' : '')) + ' custom-card';
      
              return (
                  <li>
                      <mobiscroll.Card 
                          className={classes}
                          theme="ios" 
                          themeVariant="light"
                      > 
                          <mobiscroll.CardHeader>
                              <mobiscroll.CardTitle>{this.props.item.title}</mobiscroll.CardTitle>
                              <mobiscroll.CardSubtitle>{this.props.item.desc}</mobiscroll.CardSubtitle>
                          </mobiscroll.CardHeader>
                          <mobiscroll.CardContent>
                              <img draggable="false" src={this.props.item.img} />
                          </mobiscroll.CardContent>
                      </mobiscroll.Card> 
                  </li>
              );
          }
      }
      
      class App extends React.Component {
          constructor(props) {
              super(props);
      
              this.state = {
                  items: [{
                      id: 1,
                      title: 'Best places to seek silence',
                      desc: 'The Dhamma Giri, a vipassana meditation retreat.',
                      img: 'https://img.mobiscroll.com/demos/card_1.png'
                  }, {
                      id: 2,
                      title: 'Best animal adventure',
                      desc: 'A young panda tests his climbing skills at the Chengdu Research Base.',
                      img: 'https://img.mobiscroll.com/demos/card_2.png'
                  }, {
                      id: 3,
                      title: 'Best places to test your survival skills',
                      desc: 'A view across the Turnagain Arm on Alaska\'s Kenai Peninsula.',
                      img: 'https://img.mobiscroll.com/demos/card_3.png'
                  }, {
                      id: 4,
                      title: 'Most accessible destinations',
                      desc: 'The impressive Mayan site of Chichén Itzá.',
                      img: 'https://img.mobiscroll.com/demos/card_4.png'
                  }, {
                      id: 5,
                      title: 'The world’s most extraordinary sleepovers',
                      desc: 'Explore the azure depths with a stay at the Manta Resort\'s underwater room.',
                      img: 'https://img.mobiscroll.com/demos/card_5.png'
                  }]
              };
          }
          
          stages = [{
              percent: -20,
              action: (event, inst) => {
                  inst.remove(event.target);
                  return false;
              }
          }, {
              percent: 20,
              action: (event, inst) => {
                  inst.remove(event.target);
                  return false;
              }
          }];
      
          cycleStages = [{
              percent: -20,
              action: (event, inst) => {
                  inst.move(event.target, 0);
                  return false;
              }
          }, {
              percent: 20,
              action: (event, inst) => {
                  inst.move(event.target, 0);
                  return false;
              }
          }];
          
          render() {
              return (
                  <div>
                      <mobiscroll.Note color="primary">Swipe cards away left or right to clear stack.</mobiscroll.Note>
                      <mobiscroll.Listview
                          className="mbsc-card-list custom-card-deck"
                          theme="ios" 
                          themeVariant="light"
                          itemType={ListItem} 
                          data={this.state.items}
                          stages={this.stages}
                          actionable={false}
                      />
                      <mobiscroll.Note color="primary">Swipe cards away for cyclic movement.</mobiscroll.Note>
                      <mobiscroll.Listview
                          className="mbsc-card-list custom-card-deck"
                          theme="ios" 
                          themeVariant="light"
                          itemType={ListItem} 
                          data={this.state.items}
                          stages={this.cycleStages}
                          actionable={false}
                      />
                  </div>
              );
          }
      }
      
      
      import mobiscroll from '@mobiscroll/react';
      import '@mobiscroll/react/dist/css/mobiscroll.min.css';
      
      interface DemoProps {
          item?: any;
      }
      
      interface DemoState {
          items?: any;
      }
      
      class ListItem extends React.Component< DemoProps, DemoState > {
          render() {
              const classes = (this.props.item.id % 2 == 0 ? 'custom-card-rotate-right' : (this.props.item.id % 3 == 0 ? 'custom-card-rotate-left' : '')) + ' custom-card';
      
              return (
                  <li>
                      <mobiscroll.Card 
                          className={classes}
                          theme="ios" 
                          themeVariant="light"
                      > 
                          <mobiscroll.CardHeader>
                              <mobiscroll.CardTitle>{this.props.item.title}</mobiscroll.CardTitle>
                              <mobiscroll.CardSubtitle>{this.props.item.desc}</mobiscroll.CardSubtitle>
                          </mobiscroll.CardHeader>
                          <mobiscroll.CardContent>
                              <img draggable="false" src={this.props.item.img} />
                          </mobiscroll.CardContent>
                      </mobiscroll.Card> 
                  </li>
              );
          }
      }
      
      class App extends React.Component< DemoProps, DemoState > {
          cycleStages:any;
          stages:any;
          constructor(props: DemoProps) {
              super(props);
      
              this.state = {
                  items: [{
                      id: 1,
                      title: 'Best places to seek silence',
                      desc: 'The Dhamma Giri, a vipassana meditation retreat.',
                      img: 'https://img.mobiscroll.com/demos/card_1.png'
                  }, {
                      id: 2,
                      title: 'Best animal adventure',
                      desc: 'A young panda tests his climbing skills at the Chengdu Research Base.',
                      img: 'https://img.mobiscroll.com/demos/card_2.png'
                  }, {
                      id: 3,
                      title: 'Best places to test your survival skills',
                      desc: 'A view across the Turnagain Arm on Alaska\'s Kenai Peninsula.',
                      img: 'https://img.mobiscroll.com/demos/card_3.png'
                  }, {
                      id: 4,
                      title: 'Most accessible destinations',
                      desc: 'The impressive Mayan site of Chichén Itzá.',
                      img: 'https://img.mobiscroll.com/demos/card_4.png'
                  }, {
                      id: 5,
                      title: 'The world’s most extraordinary sleepovers',
                      desc: 'Explore the azure depths with a stay at the Manta Resort\'s underwater room.',
                      img: 'https://img.mobiscroll.com/demos/card_5.png'
                  }]
              };
          }
          
          stages = [{
              percent: -20,
              action: (event: any, inst: any) => {
                  inst.remove(event.target);
                  return false;
              }
          }, {
              percent: 20,
              action: (event: any, inst: any) => {
                  inst.remove(event.target);
                  return false;
              }
          }];
      
          cycleStages = [{
              percent: -20,
              action: (event: any, inst: any) => {
                  inst.move(event.target, 0);
                  return false;
              }
          }, {
              percent: 20,
              action: (event: any, inst: any) => {
                  inst.move(event.target, 0);
                  return false;
              }
          }];
          
          render() {
              return (
                  <div>
                      <mobiscroll.Note color="primary">Swipe cards away left or right to clear stack.</mobiscroll.Note>
                      <mobiscroll.Listview
                          className="mbsc-card-list custom-card-deck"
                          theme="ios" 
                          themeVariant="light"
                          itemType={ListItem} 
                          data={this.state.items}
                          stages={this.stages}
                          actionable={false}
                      />
                      <mobiscroll.Note color="primary">Swipe cards away for cyclic movement.</mobiscroll.Note>
                      <mobiscroll.Listview
                          className="mbsc-card-list custom-card-deck"
                          theme="ios" 
                          themeVariant="light"
                          itemType={ListItem} 
                          data={this.state.items}
                          stages={this.cycleStages}
                          actionable={false}
                      />
                  </div>
              );
          }
      }
      
      
      <div id="content"></div>
      .custom-card-deck {
          margin: 1em 0;
      }
      
      .custom-card-deck .mbsc-lv-sl-c {
          max-width: 500px;
          margin: 0 auto;
      }
      
      .custom-card-deck .mbsc-lv-v {
          padding-top: 88%;
          min-height: 390px;
      }
      
      .custom-card-deck .mbsc-lv-item {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
      }
      
      .custom-card-deck .mbsc-lv-item.mbsc-lv-item-swiping {
          z-index: 10;
      }
      
      .custom-card-deck .custom-card-rotate-right {
          transform: rotate(1deg);
      }
      
      .custom-card-deck .custom-card-rotate-left {
          transform: rotate(-2deg);
      }
      
      .custom-card-deck .mbsc-card.custom-card {
          box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
      }
      Show more code

      Cards - Content

      Change demo
      Content
      React Image card demo with description. Use it between content blocks or virtually anywhere for clean rendering. For React and Ionic React.
      Copy code

      Cards - Tabs

      Change demo
      Tabs
      React Cards demo with tabbed view. Use it to break up content logically and provide bite-sized information. For React and Ionic React.
      Copy code

      Cards - Collapsible

      Change demo
      Collapsible
      React Collapsible card list with summary in the header and additional content visible when the card is expanded. For React and Ionic React.
      Copy code

      Cards - Accordion

      Change demo
      Accordion
      React Accordion cards with one card expanded at a time. Use it let users focus on a single piece of content. For React and Ionic React.
      Copy code

      Cards - Masonry layout

      Change demo
      Masonry layout
      React Image cards with variable height in masonry layout. Four column layout similar to how Pinterest renders content. For React and Ionic React.
      Copy code

      Cards - Grid layout

      Change demo
      Grid layout
      React image card grid with title and description. Use it in horizontally scrollable lists or responsive grid layout. For React and Ionic React.
      Copy code

      Looking for something you didn't see or have a sales question?
      Ask us about it, we're here to help.

      Customize & try demos locally
      Sign in or start your free trial

      What framework are you using?

      Javascript
      jQuery
      AngularJS
      Angular
      React
      Other
      Ionic Angular
      Email address

      Install demo in your app
      Follow this quick, two minute install guide
      Close window

      Step 1.Install the Mobiscroll CLI from npm

      Copy command
      $ npm install -g @mobiscroll/cli

      The CLI makes configuring your apps super simple 👍

      Step 2.Run the following command in the root folder of your Ionic project

      Copy command
      $ mobiscroll config ionic --version=4

      You will be prompted to log in with your mobiscroll account. Set your password here

      Step 3.Copy the code into your app.

      Copy TS
      Copy HTML
      Copy CSS
      Copy Module

      Step 4.Run ionic serve in the root folder of your app 🎉

      Copy command
      $ ionic serve

      And voilà, everything should be running smoothly.

      Install demo in your app
      Follow this quick, two minute install guide
      Close window

      Step 1.Install the Mobiscroll CLI from npm

      Copy command
      $ npm install -g @mobiscroll/cli

      The CLI makes configuring your apps super simple 👍

      Step 2.Run the following command in the root folder of your Ionic project

      Copy command
      $ mobiscroll config ionic --version=4

      You will be prompted to log in with your mobiscroll account. Set your password here

      Step 3.Copy the code into your app.

      Copy TSX
      Copy CSS

      Step 4.Run ionic serve in the root folder of your app 🎉

      Copy command
      $ ionic serve

      And voilà, everything should be running smoothly.

      Customize & try demos locally
      How would you like to do it?
      Install demo in your app
      Follow this quick, two minute install guide
      Close window

      Step 1.Install the Mobiscroll CLI from npm

      Copy command
      $ npm install -g @mobiscroll/cli

      The CLI makes configuring your apps super simple 👍

      Step 2.Run the following command in the root folder of your Angular project

      Copy command
      $ mobiscroll config angular --version=4

      You will be prompted to log in with your mobiscroll account. Set your password here

      Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

      Copy TS
      Copy HTML
      Copy CSS
      Copy Module

      Step 4.Run ng serve in the root folder of your app 🎉

      Copy command
      $ ng serve

      And voilà, everything should be running smoothly.

      Thanks for downloading
      Try and customize the app locally

      Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

      Step 1. Run in root folder
      $ npm install
      Step 2. Start the app
      $ ionic serve

      Let us know if we can help and enjoy!

      Thanks for downloading
      Customize demos locally

      We have set up a trial so that you can try the demos locally.

      Extract the zip file and open the demo in your favorite browser. To install Mobiscroll in your project follow instructions from this page.


      Let us know if we can help and enjoy! 👍

      Thanks for downloading
      Customize demos locally

      Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

      For installation and usage, extract the zip file and open a terminal window and follow these steps.

      Step 1. Run in root folder
      $ npm install
      Step 2. Start the app
      $ ng serve --open

      Let us know if we can help and enjoy! 👍

      Thanks for downloading
      Customize demos locally

      We have set up a trial so that you can try the demos locally.

      The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy! 👍

      You'll find a fully functional Kitchen-sink Ionic app in the zip file.

      Thanks for downloading
      Customize demos locally

      We have set up a trial so that you can try the demos locally.

      The demos are using Babel's in-browser ES6 and JSX transformer.
      Extract the zip file and open the demo in your browser. To install Mobiscroll in your project follow instructions from this page.


      Let us know if we can help and enjoy! 👍

      Customize & try this demo locally
      Sign in or start your free trial

      We have to set you up with a trial for this to run 👍

      Email address

      Need to update your password?
      Demos
      Theme Select
      Mobiscroll
      Material
      Material Dark
      iOS
      iOS Dark
      Windows
      Windows Dark
      Language Locale
      See other demos and change options
      Theme
      Locale
      See other demos