Javascript Cards
Cards for Javascript
Cards for Javascript
Cards for Javascript
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
Cards demos available for other frameworks.
Viewing demos & code for
Cards - Basic
mobiscroll.settings = {
lang: '',
theme: ''
}
document.getElementById('call-btn').addEventListener('click', function () {
mobiscroll.toast({ message: 'Call clicked'
});
});
document.getElementById('msg-btn').addEventListener('click', function () {
mobiscroll.toast({ message: 'Message clicked'
});
});
<div mbsc-card>
<div class="mbsc-card-header">
<h2 class="mbsc-card-title">Title in the header</h2>
<h3 class="mbsc-card-subtitle">Subtitle in the header</h3>
</div>
<div class="mbsc-card-content">
<span class="mbsc-bold">This is the content:</span> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book.
</div>
<div class="mbsc-card-footer">This is a footer</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Today is Jenifer's birthday</div>
</div>
<div class="mbsc-card-content">
Don't forget she is turning 25!!!
</div>
<div class="mbsc-card-footer">
<button id="call-btn" class="mbsc-btn-flat" data-icon="phone">Call</button>
<button id="msg-btn" class="mbsc-btn-flat" data-icon="bubble">Message</button>
</div>
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/card_5.png">
<div class="mbsc-card-content">
Explore the azure depths with a stay at the Manta Resort's underwater room.
</div>
<div class="mbsc-card-footer">
<button class="mbsc-btn-flat">Share</button>
<button class="mbsc-btn-flat">Explore</button>
</div>
</div>
Cards - Images
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/card_2.png">
<div class="mbsc-card-header">
<h2 class="mbsc-card-title">Best animal adventure</h2>
</div>
<div class="mbsc-card-content">
A young panda tests his climbing skills at the Chengdu Research Base.
</div>
<div class="mbsc-card-footer">
<button class="mbsc-btn-flat">Share</button>
<button class="mbsc-btn-flat">Explore</button>
</div>
</div>
<div class="md-card-bg" mbsc-card>
<img src="https://img.mobiscroll.com/demos/card_6.png">
<h2 class="md-card-title mbsc-align-center">Las Vegas</h2>
<h5 class="md-card-subtitle mbsc-align-center mbsc-bold">63 apartments available</h5>
</div>
<div mbsc-card>
<img class="mbsc-img-thumbnail mbsc-pull-right" width="90" height="90" src="https://img.mobiscroll.com/demos/card_3.png">
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best places</div>
</div>
<div class="mbsc-card-content"> A view across the Turnagain Arm on Alaska's Kenai Peninsula.
</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<h2 class="mbsc-card-title">15 minutes to work</h2>
</div>
<img src="https://img.mobiscroll.com/demos/route.png">
<div class="mbsc-card-content mbsc-btn-group-block">
<button class="mbsc-btn-flat mbsc-align-left" data-icon="ion-navigate">Navigate / 15 min. via Shotwell St</button>
<button class="mbsc-btn-flat mbsc-align-left" data-icon="fa-rotate-left">Alternative route / 18 mins</button>
</div>
</div>
.md-card-bg .md-card-subtitle,
.md-card-bg .md-card-title {
position: absolute;
top: 50%;
color: #fff;
width: 100%;
}
.md-card-bg .md-card-title {
margin-top: -30px;
}
.md-card-bg .md-card-subtitle {
margin-top: 10px;
}
Cards - Video
<div mbsc-card>
<video autoplay muted>
<source src="http://img.mobiscroll.com/demos/trailer_iphone.m4v" type="video/x-m4v">
</video>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Big Buck Bunny</div>
</div>
<div class="mbsc-card-content">
Open movie made with open source software. Check out it's trailer!
</div>
</div>
<div mbsc-card>
<video autoplay muted>
<source src="http://img.mobiscroll.com/demos/trailer_iphone.m4v" type="video/x-m4v">
</video>
<div class="mbsc-card-footer">
<button class="mbsc-btn-flat">Play</button>
<button class="mbsc-btn-flat">Reset</button>
</div>
</div>
Cards - Lists
mobiscroll.settings = {
lang: '',
theme: ''
}
mobiscroll.listview('.md-lv', {
enhance: true
})
mobiscroll.listview('.md-lv-checklist', {
theme: '',
lang: '',
stages: {
left: [{
key: 'stage1',
icon: 'plus',
color: '#31c6e7',
text: 'Add',
action: function (event, inst) {
inst.add(null, '<input type="checkbox" data-role="none" /> New Todo', event.index + 1);
}
}],
right: [{
key: 'stage2',
color: '#009688',
text: 'Remove',
icon: 'remove',
action: function (event, inst) {
inst.remove(event.target);
return false;
}
}]
}
});
<div mbsc-card>
<ul class="md-lv-checklist mbsc-cloak" mbsc-enhance>
<li><input type="checkbox" data-role="none" checked />Do the laundry</li>
<li><input type="checkbox" data-role="none" />Check out new Mobiscroll features</li>
<li><input type="checkbox" data-role="none" checked />Don't forget mom's birthday!</li>
<li><input type="checkbox" data-role="none" />Update my app with the latest Mobiscroll</li>
<li><input type="checkbox" data-role="none" />Buy new shoes</li>
<li><input type="checkbox" data-role="none" />Need ketchup for pizza</li>
</ul>
</div>
<div mbsc-card>
<ul class="md-lv mbsc-cloak">
<li data-id="1" data-icon="line-user">Edit profile
<ul>
<li data-icon="line-key">Change password</li>
<li data-icon="line-user">Change personal information</li>
</ul>
</li>
<li data-id="2" data-icon="line-settings">Settings
<ul>
<li data-icon="line-megaphone">Sound settings</li>
<li data-icon="line-params">Notification settings</li>
<li data-icon="line-t-shirt">Change theme</li>
</ul>
</li>
<li data-id="3" data-icon="line-heart">Rate
<ul>
<li data-icon="line-star">Rate this application on Google Play</li>
</ul>
</li>
<li data-id="4" data-icon="line-bubble">Tell a friend
<ul>
<li data-icon="line-mail">Share it in Email</li>
<li data-icon="line-world">Share it on Social media</li>
</ul>
</li>
<li data-id="6" data-icon="line-note">Term of service
<ul>
<li>This application content is under WTFPL license.</li>
</ul>
</li>
<li data-id="5" data-icon="line-mail">Contact us
<ul>
<li data-icon="line-mail">Let us know if we can help.</li>
</ul>
</li>
<li data-id="7" data-icon="line-world">About us
<ul>
<li>We are the Mobiscroll team.</li>
</ul>
</li>
</ul>
</div>
.mbsc-lv-cont .cd-todo-item {
padding: 0;
}
Cards - Social cards
<div mbsc-card>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/mr-profile2.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Carl Obama</h5>
<div class="mbsc-card-subtitle"> at 5:16 PM</div>
</div>
<img src="https://img.mobiscroll.com/demos/Blueberry.png">
<div class="mbsc-card-content">
Yeaahhh :D :D :D I've made it. It took me 3 months to improve my blueberry cake. But it's perfect now. :P
</div>
<div class=" mbsc-card-footer ">
<button class="mbsc-btn mbsc-btn-flat" data-icon="heart"></button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="thumbs-up2"></button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="material-message"></button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="tag"></button>
</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/mrs-profile1.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Hortense Tinker</h5>
<div class="mbsc-card-subtitle"> at 4:55 PM</div>
</div>
<img src="https://img.mobiscroll.com/demos/card_1.png">
<div class="mbsc-card-content">
Best places to seek silence !!! The Dhamma Giri, a vipassana meditation retreat.
</div>
<div class=" mbsc-card-footer mbsc-align-right">
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-mail-reply"></button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="star3">3</button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-retweet">5</button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-ellipsis-h"></button>
</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/mrs-profile2.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Jenna Doe</h5>
<div class="mbsc-card-subtitle"> at 4:16 PM</div>
</div>
<img src="https://img.mobiscroll.com/demos/card_2.png">
<div class="mbsc-card-content">
There is a new baby panda at the zoo.... :) :O :D
</div>
<div class=" mbsc-card-footer mbsc-align-right">
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-mail-reply"></button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="star3">19</button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-retweet">3</button>
<button class="mbsc-btn mbsc-btn-flat" data-icon="fa-ellipsis-h"></button>
</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/mr-profile1.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">John Bush</h5>
<div class="mbsc-card-subtitle"> at 2:23 PM</div>
</div>
<img src="https://img.mobiscroll.com/demos/account-background.jpg">
<div class="mbsc-card-content">
Best trip ever!!! :D I'll definetly come back here. :)
</div>
<div class=" mbsc-card-footer ">
<button class="mbsc-btn mbsc-btn-flat">Like</button>
<button class="mbsc-btn mbsc-btn-flat">Share</button>
</div>
</div>
Cards - Forms
<div mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Volume</div>
</div>
<div class="mbsc-card-content">
<label>
<input value="95" type="range" data-role="range" data-icon='{ "left": "volume-medium" }'>
</label>
<label>
<input value="65" type="range" data-role="range" data-icon='{ "left": "alarm2" }'>
</label>
<label>
<input value="35" type="range" data-role="range" data-icon='{ "left": "mobile" }'>
</label>
</div>
</div>
<div mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Confirm Purchase</div>
</div>
<div class="mbsc-card-content">
<label>
Name
<input type="text" placeholder="Required" />
</label>
<label>
Card
<input type="text" placeholder="Credit card number" />
</label>
<label>
Expiration
<input id="demo" type="text" placeholder="Required" />
</label>
<label>
Security
<input type="text" placeholder="3-digit CVV" />
</label>
</div>
<div class="mbsc-btn-group-block mbsc-padding">
<button class="mbsc-btn-primary">Confirm</button>
</div>
</div>
Cards - Swipe away
mobiscroll.settings = {
lang: '',
theme: ''
}
mobiscroll.listview('.mbsc-card-list', {
stages: [{
percent: -20,
action: function (event, inst) {
inst.remove(event.target);
return false;
}
}, {
percent: 20,
action: function (event, inst) {
inst.remove(event.target);
return false;
}
}]
});
<div class="mbsc-note mbsc-note-primary mbsc-align-center">
Swipe left/right to clear cards.
</div>
<ul class="mbsc-card-list mbsc-cloak">
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/netflix.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Netflix</h5>
<div class="mbsc-card-subtitle">Sherlock Series 3 is now avalable on Netflix</div>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/angrybirds.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Angry birds</h5>
<div class="mbsc-card-subtitle">Don't forget your daily Arena entry.</div>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/candycam.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Candycam</h5>
<div class="mbsc-card-subtitle">A new update is available!</div>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Today is Jenifer's birthday</div>
</div>
<div class="mbsc-card-content">
Don't forget she is turning 25!!!
</div>
<div class="mbsc-card-footer">
<button class="mbsc-btn-flat" data-icon="phone">Call</button>
<button class="mbsc-btn-flat" data-icon="bubble">Message</button>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/subwaysurf.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Subway Surf</h5>
<div class="mbsc-card-subtitle">Is it your lucky day? 24-Hour Mega Jackpint Event happening right now!</div>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/mbsc-logo.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Mobiscroll</h5>
<div class="mbsc-card-subtitle">The new Mobiscroll 4.0.0 is out!</div>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-header">
<h2 class="mbsc-card-title">15 minutes to work</h2>
</div>
<img src="https://img.mobiscroll.com/demos/route.png" draggable="false">
<div class="mbsc-card-content mbsc-btn-group-block">
<button class="mbsc-btn-flat mbsc-align-left" data-icon="ion-navigate">Navigate / 15 min. via Shotwell St</button>
<button class="mbsc-btn-flat mbsc-align-left" data-icon="fa-rotate-left">Alternative route / 18 mins</button>
</div>
</li>
<li mbsc-card>
<div class="mbsc-card-content">
<img src="https://img.mobiscroll.com/demos/opencam.png" draggable="false" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Open Camera</h5>
<div class="mbsc-card-subtitle">A new update is available!</div>
</div>
</li>
</ul>
Cards - Stacked cards
mobiscroll.settings = {
lang: '',
theme: ''
};
mobiscroll.listview('#card-deck', {
stages: [{
percent: -20,
action: (event, inst) => {
inst.remove(event.target);
return false;
}
}, {
percent: 20,
action: (event, inst) => {
inst.remove(event.target);
return false;
}
}]
});
mobiscroll.listview('#card-deck-cycle', {
stages: [{
percent: -20,
action: (event, inst) => {
inst.move(event.target, 0);
return false;
}
}, {
percent: 20,
action: (event, inst) => {
inst.move(event.target, 0);
return false;
}
}]
});
<div class="mbsc-note mbsc-note-primary mbsc-align-center">
Swipe cards away left or right to clear stack.
</div>
<ul id="card-deck" class="mbsc-card-list custom-card-deck mbsc-cloak">
<li>
<div class="custom-card custom-card-rotate-right" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best places to seek silence</div>
<div class="mbsc-card-subtitle">The Dhamma Giri, a vipassana meditation retreat.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_1.png">
</div>
</div>
</li>
<li>
<div class="custom-card" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best animal adventure</div>
<div class="mbsc-card-subtitle">A young panda tests his climbing skills at the Chengdu Research Base.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_2.png">
</div>
</div>
</li>
<li>
<div class="custom-card custom-card-rotate-left" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best places to test your survival skills</div>
<div class="mbsc-card-subtitle">A view across the Turnagain Arm on Alaska's Kenai Peninsula.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_3.png">
</div>
</div>
</li>
<li>
<div class="custom-card custom-card-rotate-right" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Most accessible destinations</div>
<div class="mbsc-card-subtitle">The impressive Mayan site of Chichén Itzá.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_4.png">
</div>
</div>
</li>
<li>
<div class="custom-card" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">The world’s most extraordinary sleepovers</div>
<div class="mbsc-card-subtitle">Explore the azure depths with a stay at the Manta Resort's underwater room.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_5.png">
</div>
</div>
</li>
</ul>
<div class="mbsc-note mbsc-note-primary mbsc-align-center">
Swipe cards away for cyclic movement.
</div>
<ul id="card-deck-cycle" class="mbsc-card-list custom-card-deck mbsc-cloak">
<li>
<div class="custom-card custom-card-rotate-right" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best places to seek silence</div>
<div class="mbsc-card-subtitle">The Dhamma Giri, a vipassana meditation retreat.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_1.png">
</div>
</div>
</li>
<li>
<div class="custom-card custom-card-rotate-left" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best animal adventure</div>
<div class="mbsc-card-subtitle">A young panda tests his climbing skills at the Chengdu Research Base.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_2.png">
</div>
</div>
</li>
<li>
<div class="custom-card" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Best places to test your survival skills</div>
<div class="mbsc-card-subtitle">A view across the Turnagain Arm on Alaska's Kenai Peninsula.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_3.png">
</div>
</div>
</li>
<li>
<div class="custom-card custom-card-rotate-right" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">Most accessible destinations</div>
<div class="mbsc-card-subtitle">The impressive Mayan site of Chichén Itzá.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_4.png">
</div>
</div>
</li>
<li>
<div class="custom-card custom-card-rotate-left" mbsc-card>
<div class="mbsc-card-header">
<div class="mbsc-card-title">The world’s most extraordinary sleepovers</div>
<div class="mbsc-card-subtitle">Explore the azure depths with a stay at the Manta Resort's underwater room.</div>
</div>
<div class="mbsc-card-content">
<img draggable="false" src="https://img.mobiscroll.com/demos/card_5.png">
</div>
</div>
</li>
</ul>
.custom-card-deck,
.custom-card-deck .mbsc-lv-v {
height: 400px;
max-width: 500px;
margin: 15px auto;
}
.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 {
height: 320px;
}
.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);
}
Cards - Content
<div class="mbsc-padding">
<h3>Sunrise</h3>
<p>Sunrise or sun up is the instant at which the upper edge of the Sun appears over the horizon in the morning. The term can also refer to the entire process of the Sun crossing the horizon and its accompanying atmospheric effects.</p>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/bookpic.png">
<div class="mbsc-card-footer">
A red sunrise near Swifts Creek, Australia
</div>
</div>
<p>Although the Sun appears to "rise" from the horizon, it is actually the Earth's motion that causes the Sun to appear. The illusion of a moving Sun results from Earth observers being in a rotating reference frame; this apparent motion is so convincing
that most cultures had mythologies and religions built around the geocentric model, which prevailed until astronomer Nicolaus Copernicus first formulated the heliocentric model in the 16th century.</p>
</div>
Cards - Tabs
mobiscroll.settings = {
lang: '',
theme: ''
}
mobiscroll.nav('#nav', {
display: 'inline',
type: 'tab',
onItemTap: function (event, inst) {
document.querySelector('.md-card-tab-sel').classList.remove('md-card-tab-sel');
document.getElementById(event.target.getAttribute('data-tab')).classList.add('md-card-tab-sel');
}
});
<div mbsc-card>
<div class="mbsc-card-content">
<div class="mbsc-card-title">Daily tips</div>
</div>
<ul id="nav" class="mbsc-cloak">
<li data-tab="tab-food" data-selected="true">Food</li>
<li data-tab="tab-tech">Technology</li>
<li data-tab="tab-travel">Travel</li>
</ul>
<div class="mbsc-card-content">
<div id="tab-food" class="md-card-tab md-card-tab-sel">
<h4>Ina's Mac and Cheese</h4>
<p>
Here's what one recipe reviewer had to say: "This mac and cheese is all grown-up. It was tasty, cheesy and easy to make. Have made it a few times in the last 2 months and it is a hit each time."
</p>
</div>
<div id="tab-tech" class="md-card-tab">
<h4>Google Go</h4>
<p>
Google Go makes discovering, exploring, and sharing the best of the web easy and fast. Get answers quickly and reliably with Google Go, even on slow connections and smartphones with low space. At 5MB in size, it’s speedy to download and get started.
</p>
</div>
<div id="tab-travel" class="md-card-tab">
<h4>Take Lots Of Photos</h4>
<p>
You may only see these places & meet these people once in your lifetime. Remember them forever with plenty of photos. Don’t worry about looking like a “tourist”. Are you traveling to look cool? No one cares. Great photos are the ultimate souvenir.
</p>
</div>
</div>
<div class="mbsc-card-footer mbsc-align-right">
<button class="mbsc-btn-flat">Read more</button>
</div>
</div>
.md-card-tab {
display: none;
}
.md-card-tab-sel {
display: block;
}
Cards - Collapsible
mobiscroll.settings = {
lang: '',
theme: ''
}
var collapsibles = document.querySelectorAll('[data-collapsible]');
document
.getElementById('close-all')
.addEventListener('click', function () {
for (var i = 0; i < collapsibles.length; ++i) {
mobiscroll.instances[collapsibles[i].id].hide();
}
})
document
.getElementById('toggle-first')
.addEventListener('click', function () {
mobiscroll.instances[collapsibles[0].id].toggle();
})
<div mbsc-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">Use collapsible cards for segmenting long forms and to hide content.</div>
</div>
<div class="mbsc-btn-group-block">
<button id="toggle-first">Toggle first card</button>
<button id="close-all">Close all cards</button>
</div>
</div>
<div mbsc-card data-collapsible>
<div class="mbsc-card-header">
<div>
<div class="mbsc-card-subtitle mbsc-bold mbsc-txt-s">27/07/2018</div>
<div class="mbsc-bold">FRIDAY AFTERNOON RUN</div>
<div class="mbsc-grid mbsc-margin mbsc-txt-muted mbsc-bold mbsc-txt-s">
<div class="mbsc-row mbsc-no-padding">
<div class="mbsc-col">5.43km</div>
<div class="mbsc-col">5'44"/km</div>
<div class="mbsc-col">30:45</div>
</div>
</div>
</div>
</div>
<div class="mbsc-card-content mbsc-no-padding">
<img src="https://img.mobiscroll.com/demos/run-1.png" />
<div class="mbsc-btn-group-block">
<button class="mbsc-btn-primary">View details</button>
<button class="mbsc-btn-secondary">Share your run</button>
</div>
</div>
</div>
<div mbsc-card data-collapsible data-open>
<div class="mbsc-card-header">
<div>
<div class="mbsc-card-subtitle mbsc-bold mbsc-txt-s">30/07/2018</div>
<div class="mbsc-bold">MONDAY AFTERNOON RUN</div>
<div class="mbsc-grid mbsc-margin mbsc-txt-muted mbsc-bold mbsc-txt-s">
<div class="mbsc-row mbsc-no-padding">
<div class="mbsc-col">4.28km</div>
<div class="mbsc-col">4'12"/km</div>
<div class="mbsc-col">26:41</div>
</div>
</div>
</div>
</div>
<div class="mbsc-card-content mbsc-no-padding">
<img src="https://img.mobiscroll.com/demos/run-2.png" />
<div class="mbsc-btn-group-block">
<button class="mbsc-btn-primary">View details</button>
<button class="mbsc-btn-secondary">Share your run</button>
</div>
</div>
</div>
<div mbsc-card data-collapsible>
<div class="mbsc-card-header">
<div>
<div class="mbsc-card-subtitle mbsc-bold mbsc-txt-s">01/08/2018</div>
<div class="mbsc-bold">WEDNESDAY AFTERNOON RUN</div>
<div class="mbsc-grid mbsc-margin mbsc-txt-muted mbsc-bold mbsc-txt-s">
<div class="mbsc-row mbsc-no-padding">
<div class="mbsc-col">7.02km</div>
<div class="mbsc-col">3'48"/km</div>
<div class="mbsc-col">38:41</div>
</div>
</div>
</div>
</div>
<div class="mbsc-card-content mbsc-no-padding">
<img src="https://img.mobiscroll.com/demos/run-3.png" />
<div class="mbsc-btn-group-block">
<button class="mbsc-btn-primary">View details</button>
<button class="mbsc-btn-secondary">Share your run</button>
</div>
</div>
</div>
Cards - Accordion
mobiscroll.settings = {
lang: '',
theme: ''
}
var collapsibles = document.querySelectorAll('[data-collapsible]');
mobiscroll.listview('.md-contact-list', {
swipe: false,
enhance: true
})
document
.getElementById('close-all')
.addEventListener('click', function () {
for (var i = 0; i < collapsibles.length; ++i) {
mobiscroll.instances[collapsibles[i].id].hide();
}
})
document
.getElementById('toggle-last')
.addEventListener('click', function () {
mobiscroll.instances[collapsibles[3].id].toggle();
})
<div mbsc-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">Use the accordion on card to expand only one panel at a time.</div>
</div>
<div class="mbsc-btn-group-block">
<button id="toggle-last">Toggle last card</button>
<button id="close-all">Close all cards</button>
</div>
</div>
<div mbsc-accordion>
<div mbsc-card data-collapsible data-open>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/f2.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Adeline Sharman</h5>
<div class="mbsc-card-subtitle">Bigcorp Inc.</div>
</div>
<div class="mbsc-card-content">
<ul class="md-contact-list mbsc-cloak">
<li data-icon="material-email">
<p>Email</p>
<h4><a href="mailto:adeline-s@bigcorp.com">adeline-s@bigcorp.com</a></h4>
</li>
<li data-icon="material-phone-iphone">
<p>Mobile</p>
<h4><a href="tel:(202) 555-0147">(202) 555-0147</a></h4>
</li>
</ul>
</div>
</div>
<div mbsc-card data-collapsible>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/m2.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Carl Hambledon</h5>
<div class="mbsc-card-subtitle">Washaway Ltd.</div>
</div>
<div class="mbsc-card-content">
<ul class="md-contact-list mbsc-cloak">
<li data-icon="material-email">
<p>Email</p>
<h4><a href="mailto:adeline-s@bigcorp.com">carl.h@washaway.com</a></h4>
</li>
<li data-icon="material-phone-iphone">
<p>Mobile</p>
<h4><a href="tel:(202) 553-5247">(202) 553-5247</a></h4>
</li>
</ul>
</div>
</div>
<div mbsc-card data-collapsible>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/f1.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Hortense Tinker</h5>
<div class="mbsc-card-subtitle">Tinker Records</div>
</div>
<div class="mbsc-card-content">
<ul class="md-contact-list mbsc-cloak">
<li data-icon="material-email">
<p>Email</p>
<h4><a href="hortense@tinker.com">hortense@tinker.com</a></h4>
</li>
<li data-icon="material-phone-iphone">
<p>Mobile</p>
<h4><a href="tel:(202) 555-0137">(202) 555-0137</a></h4>
</li>
</ul>
</div>
</div>
<div mbsc-card data-collapsible>
<div class="mbsc-card-header">
<img src="https://img.mobiscroll.com/demos/m1.png" class="mbsc-avatar">
<h5 class="mbsc-card-title mbsc-bold">Barry Lyon</h5>
<div class="mbsc-card-subtitle">Road Scrapers Inc</div>
</div>
<div class="mbsc-card-content">
<ul class="md-contact-list mbsc-cloak">
<li data-icon="material-email">
<p>Email</p>
<h4><a href="mailto:barry.ly@roads.com">barry.ly@roads.com</a></h4>
</li>
<li data-icon="material-phone-iphone">
<p>Mobile</p>
<h4><a href="tel:(302) 663-5247">(302) 663-5247</a></h4>
</li>
</ul>
</div>
</div>
</div>
Cards - Masonry layout
<div class="mbsc-grid-lg mbsc-grid-fixed mbsc-no-padding md-grid-cards">
<div class="mbsc-row">
<div class="mbsc-col">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-1.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-2.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-3.jpg">
</div>
</div>
<div class="mbsc-col">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-4.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-5.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-6.jpg">
</div>
</div>
<div class="mbsc-col">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-7.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-8.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-9.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-10.jpg">
</div>
</div>
<div class="mbsc-col">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-11.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-12.jpg">
</div>
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/world-cup-13.jpg">
</div>
</div>
</div>
</div>
Cards - Grid layout
mobiscroll.settings = {
lang: '',
theme: ''
}
mobiscroll.scrollview('.demo-cards', {
layout: 'fixed',
itemWidth: 134,
snap: false
});
<div class="mbsc-padding">
<h3>Scrollable list</h3>
<ul class="demo-cards mbsc-cloak">
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/toucan.jpg" draggable="false">
<div class="mbsc-card-content">Toucan</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/kingfisher.jpg" draggable="false">
<div class="mbsc-card-content">Kingfisher</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/swift.jpg" draggable="false">
<div class="mbsc-card-content">Swift</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/humming.jpg" draggable="false">
<div class="mbsc-card-content">Humming bird</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/columbidae.jpg" draggable="false">
<div class="mbsc-card-content">Columbidae</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/hornbill.jpg" draggable="false">
<div class="mbsc-card-content">Hornbill</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/spoonbill.jpg" draggable="false">
<div class="mbsc-card-content">Spoonbill</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/bee-eater.jpg" draggable="false">
<div class="mbsc-card-content">Bee-eater</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/parrot.jpg" draggable="false">
<div class="mbsc-card-content">Parrot</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/goose.jpg" draggable="false">
<div class="mbsc-card-content">Goose bird</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/woodpecker.jpg" draggable="false">
<div class="mbsc-card-content">Woodpecker</div>
</li>
<li mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/penguin.jpg" draggable="false">
<div class="mbsc-card-content">Penguin</div>
</li>
</ul>
<h3>Grid view</h3>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-center mbsc-no-padding">
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/okapi.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Okapi</div>
<p class="mbsc-txt-muted">The okapi is an animal native to the Democratic Republic of Congo in Africa.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/dragon.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">The Blue Dragon</div>
<p class="mbsc-txt-muted">These little dragon-like creatures can be found in the Indian Pacific Oceans.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/wolf.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">The Maned Wolf</div>
<p class="mbsc-txt-muted">The maned wolf is often found in south, CW, and SE parts of Brazil.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/fossa.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Fossa</div>
<p class="mbsc-txt-muted">A carnivorous animal located in Madagascar related to the Mongoose.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/shark.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Goblin Shark</div>
<p class="mbsc-txt-muted">Last representative of sharks that lived about 125 million years ago.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/deer.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Leaf Deer</div>
<p class="mbsc-txt-muted">The leaf deer is usually found in dense forests in the NW of Putao. </p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/spidercrab.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Japanese Spider Crab</div>
<p class="mbsc-txt-muted">As the name suggestions, it inhabits the waters surrounding Japan.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/rabbit.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Angora Rabbit</div>
<p class="mbsc-txt-muted">These rabbits originated in Turkey but managed to spread throughout Europe.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/axolotl.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Axolotl</div>
<p class="mbsc-txt-muted">The "Mexican salamander" is often spotted in lakes around Mexico.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/liger.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Liger</div>
<p class="mbsc-txt-muted">The liger is a real animal created by a lion and a tiger mating.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/panda.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Red Panda</div>
<p class="mbsc-txt-muted">This cute, small panda lives in the eastern Himalayas and SW China.</p>
</div>
</div>
</div>
<div class="mbsc-col-12 mbsc-col-sm-6 mbsc-col-lg-4 mbsc-col-xl-3">
<div mbsc-card>
<img src="https://img.mobiscroll.com/demos/gridlayout/superbird.jpg" draggable="false">
<div class="mbsc-card-content">
<div class="mbsc-card-title">Superbird</div>
<p class="mbsc-txt-muted">Found in New Guinea, it is unsure how many of these birds there are.</p>
</div>
</div>
</div>
</div>
</div>
</div>
Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.
Component license
Purchase component licenses if you are looking for specific funcionality.
All
Framework license
Get all 36 components, including
Framework license
Get all 36 components, including
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Framework license
Select the development framework you are using. Get all 36 components with the license.
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Select the framework you are interested in
Use Javascript when building with plain and simple JS.
Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.
Use AngularJS when building with Angular 1.x or Ionic 1.
Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4.
Use it when you are building your app or website with React.
Do you need additional support seats?
The framework license comes with one support seat. ( +$50/seat )
Add the source code?
What framework are you using?
We have to set you up with a trial for this to run 👍
What framework are you using?
Step 1.Install the Mobiscroll CLI from npm
$ 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
$ mobiscroll config ionic
$ mobiscroll config ionic --lite
You will be prompted to log in with your mobiscroll account. Set your password here
Create an Ionic 3 & Mobiscroll starter with the CLI:
Run this command for Ionic 4 & Mobiscroll starter:
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.
$ npm install
$ ionic serve
Let us know if we can help and enjoy!
Your password has been changed!
Everything is set up so that you can dig in right away and start exploring.
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! 👍
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.
$ npm install
$ ng serve --open
Let us know if we can help and enjoy! 👍
Everything is set up so that you can dig in right away and start exploring.
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.
Everything is set up so that you can dig in right away and start exploring.
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! 👍