Collapsible for React

Learn more

Use the collapsible and accordion to make custom panels, form groups and cards collapsible one by one or alternate close & open. Use it to segment long forms and content or use it for progressive disclosure.


Collapsible and accordion demos available for other frameworks.

Viewing demos & code for

light
dark

Change the theme setting here

Collapsible - Collapsible form group

Change demo
Collapsible form group
React Collapsible panel demo. Use it to segment long forms by making field groups expandable/collapsible. For React.
import mobiscroll from '@mobiscroll/react';
import '@mobiscroll/react/dist/css/mobiscroll.min.css';

class App extends React.Component {
    render() {
        return (
            <div>
                <mobiscroll.Note className="mbsc-align-center" color="primary">Use collapsible groups for segmenting long forms and to hide content.</mobiscroll.Note>

                <mobiscroll.Form>
                    <div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.toggleFirst}>Toggle first group</mobiscroll.Button>
                        <mobiscroll.Button onClick={this.closeAll}>Close all groups</mobiscroll.Button>
                    </div>
                    <mobiscroll.FormGroup ref="contactDetails" collapsible open>
                        <mobiscroll.FormGroupTitle>
                            Contact details
                        </mobiscroll.FormGroupTitle>
                        <mobiscroll.FormGroupContent>
                            <mobiscroll.Input placeholder="Your first name">First Name</mobiscroll.Input>
                            <mobiscroll.Input placeholder="Your last name">Last Name</mobiscroll.Input>
                            <mobiscroll.Input placeholder="Company if applicable">Company</mobiscroll.Input>
                            <mobiscroll.Input type="tel" placeholder="Your phone number">Phone</mobiscroll.Input>
                            <mobiscroll.Input type="email" placeholder="Your email address">Email</mobiscroll.Input>
                        </mobiscroll.FormGroupContent>
                    </mobiscroll.FormGroup>
                
                    <mobiscroll.FormGroup ref="shippingDetails" collapsible>
                        <mobiscroll.FormGroupTitle>
                            Shipping address
                        </mobiscroll.FormGroupTitle>
                        <mobiscroll.FormGroupContent>
                             <mobiscroll.Textarea>Shipping address</mobiscroll.Textarea>
                            <mobiscroll.Input placeholder="City">City</mobiscroll.Input>
                            <mobiscroll.Input placeholder="State/Region">State/Region</mobiscroll.Input>
                            <mobiscroll.Input placeholder="Zip/Postal code">Zip</mobiscroll.Input>
                            
                            <mobiscroll.Dropdown label="Country">
                                <option>Please Select</option>
                            </mobiscroll.Dropdown>
                        </mobiscroll.FormGroupContent>
                    </mobiscroll.FormGroup>
                
                    <mobiscroll.FormGroup ref="paymentDetails" collapsible>
                        <mobiscroll.FormGroupTitle>
                            Payment details
                        </mobiscroll.FormGroupTitle>
                        <mobiscroll.FormGroupContent>
                            <mobiscroll.Input placeholder="Name on card">Name</mobiscroll.Input>
                            <mobiscroll.Input placeholder="Credit card number">Card</mobiscroll.Input>
                            <mobiscroll.Dropdown label="Expiration">
                                <option>Select</option>
                                <option>12/2018</option>
                                <option>01/2019</option>
                                <option>02/2019</option>
                            </mobiscroll.Dropdown>
                            <mobiscroll.Input  type="number" placeholder="3-digit CVV">Security</mobiscroll.Input>
                        </mobiscroll.FormGroupContent>
                    </mobiscroll.FormGroup>
                </mobiscroll.Form>
            </div>
        );
    }
    
    constructor(props) {
        super(props);
    }
    
    closeAll = () => {
        this.refs.contactDetails.instance.hide();
        this.refs.shippingDetails.instance.hide();
        this.refs.paymentDetails.instance.hide();
    }
    
    toggleFirst = () => {
        this.refs.contactDetails.instance.toggle();
        
    }
}

<div id="content"></div>

Collapsible - Accordion

Change demo
Accordion
React Accordion demo with a one open/expanded panel. Use it let users focus on a single piece of content at a time. For React.
import mobiscroll from '@mobiscroll/react';
import '@mobiscroll/react/dist/css/mobiscroll.min.css';

class App extends React.Component {
    render() {
        return (
            <div>
                <mobiscroll.Note className="mbsc-align-center" color="primary">Use the accordion on forms to open only one panel at a time.</mobiscroll.Note>
                
                <mobiscroll.Form>
                    <div className="mbsc-btn-group-block">
                        <mobiscroll.Button onClick={this.toggleLast}>Toggle last panel</mobiscroll.Button>
                        <mobiscroll.Button onClick={this.closeAll}>Close all panels</mobiscroll.Button>
                    </div>
                    <mobiscroll.Accordion>
                        <mobiscroll.FormGroup ref="mbsc" collapsible open>
                            <mobiscroll.FormGroupTitle>
                                What is Mobiscroll?
                            </mobiscroll.FormGroupTitle>
                            <mobiscroll.FormGroupContent>
                               <div className="mbsc-padding">
                                    <p>Mobiscroll UI is a library of components for progressive webapps and hybrid development. Created with a lot of attention to usability and performance. Learn more about mobiscroll and see if it is for you?</p>
                                </div>
                            </mobiscroll.FormGroupContent>
                        </mobiscroll.FormGroup>
                    
                        <mobiscroll.FormGroup ref="upgrade" collapsible>
                            <mobiscroll.FormGroupTitle>
                                Upgrades
                            </mobiscroll.FormGroupTitle>
                            <mobiscroll.FormGroupContent>
                               <div className="mbsc-padding">
                                    <p>You can use mobiscroll in your responsive or mobile webapps and hybrid apps (like Cordova, Phonegap, Ionic). Mobiscroll is framework agnostic and runs everywhere where Javascript can be executed. However it comes in a couple of
                                        flavors for major Frameworks: Plain Javascript, jQuery and jQuery Mobile, Angular and Angular based frameworks (like Ionic) - both Angular JS and Angular 2+ is supported and React.</p>
                                </div>
                            </mobiscroll.FormGroupContent>
                        </mobiscroll.FormGroup>
                    
                        <mobiscroll.FormGroup ref="usage" collapsible>
                            <mobiscroll.FormGroupTitle>
                                Usage
                            </mobiscroll.FormGroupTitle>
                            <mobiscroll.FormGroupContent>
                                <div className="mbsc-padding">
                                     <p>You can use mobiscroll in your responsive or mobile webapps and hybrid apps (like Cordova, Phonegap, Ionic). Mobiscroll is framework agnostic and runs everywhere where Javascript can be executed. However it comes in a couple of
                                    flavors for major Frameworks: Plain Javascript, jQuery and jQuery Mobile, Angular and Angular based frameworks (like Ionic) - both Angular JS and Angular 2+ is supported and React.</p>
                                </div>
                            </mobiscroll.FormGroupContent>
                        </mobiscroll.FormGroup>
                        
                        <mobiscroll.FormGroup ref="payment" collapsible>
                            <mobiscroll.FormGroupTitle>
                                Payment details
                            </mobiscroll.FormGroupTitle>
                            <mobiscroll.FormGroupContent>
                                <div className="mbsc-padding">
                                    <p>The Theme Builder is the quickest way to get beautiful and professional looking themes that match your brand and application. We provide a super-easy to use tool where themes can be customized with just a couple of clicks. You
                                        can create your custom themes with a Trial account and download once upgraded to the full product.</p>
                                </div>
                            </mobiscroll.FormGroupContent>
                        </mobiscroll.FormGroup>
                    </mobiscroll.Accordion>
                </mobiscroll.Form>
            </div>
        );
    }
    
    constructor(props) {
        super(props);
    }
    
    closeAll = () => {
        this.refs.mbsc.instance.hide();
        this.refs.upgrade.instance.hide();
        this.refs.usage.instance.hide();
        this.refs.payment.instance.hide();
    }
    
    toggleLast = () => {
        this.refs.payment.instance.toggle();
        
    }
}

<div id="content"></div>

Collapsible - Collapsible cards

Change demo
Collapsible cards
React Collapsible cards example. Use it to show/conceal card content. Expand and collapse on card header click. For React.
import mobiscroll from '@mobiscroll/react';
import '@mobiscroll/react/dist/css/mobiscroll.min.css';

class CardItem extends React.Component {
    render = () => {
        const app = this.props.app;
        return <div className="mbsc-col-12 mbsc-col-md-4">
            <mobiscroll.Card collapsible theme="" lang="">
                <mobiscroll.CardHeader>
                    <mobiscroll.CardTitle>{app.name}</mobiscroll.CardTitle>
                    <p className="mbsc-txt-muted">{app.about}</p>
                </mobiscroll.CardHeader>
                <mobiscroll.CardContent className="mbsc-no-padding">
                    <img src={app.img} draggable="false" />
                </mobiscroll.CardContent>
            </mobiscroll.Card>
        </div>;
    }
}

class App extends React.Component {
    render() {
        return (
            <div className="mbsc-grid">
                <div className="mbsc-row mbsc-no-padding">
                    {this.props.animals.map(function(app) {
                        return <CardItem app={app} key={app.id} />;
                    })}
                </div>
            </div>
        );
    }    
    static defaultProps = {
        animals: [ {
            id: 1,
            img: 'https://img.mobiscroll.com/demos/gridlayout/dragon.jpg',
            name: 'The Blue Dragon',
            about: 'These little dragon-like creatures live in the Indian Pacific Oceans.'
        }, {
            id: 2,
            img: 'https://img.mobiscroll.com/demos/gridlayout/wolf.jpg',
            name: 'The Maned Wolf',
            about: 'The maned wolf is often found in south, CW, and SE parts of Brazil.'
        }, {
            id: 3,
            img: 'https://img.mobiscroll.com/demos/gridlayout/spidercrab.jpg',
            name: 'Japanese Spider Crab',
            about: 'As the name suggestions, it inhabits the waters surrounding Japan.'
        }]
    };
}

<div id="content"></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.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for React $595


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/8 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for React $595


  • 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 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
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • 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 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
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

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/8 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The license comes with one support seat. ( +$100/seat )

Add the source code?

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

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

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

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
$ 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:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

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.

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
$ mobiscroll config angular --lite

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!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

Please extract the zip file and simply open the demos in your favorite browser. For instructions on how to install Mobiscroll in your project follow this guide.


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

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.

Thanks for downloading
Customize demos locally

The demos are using Babel's in-browser ES6 and JSX transformer.

Please extract the zip file and open the demos in your browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Demos
Alerts & notifications
Alert Notifications Note
Components
Alerts & notifications 3
Buttons 4
Calendar 27
Cards 14
Collapsible 3
Color 10
Date & Time 20
Event Calendar 25
Forms 13
Grid layout 7
Image 7
Inputs & fields 6
Listview 18
Measurement 10
Navigation 8
Number 8
Numpad 14
Option List 4
Popup 10
Range 19
Scroller 7
Scrollview 5
Select 18
Slider & progress 4
Styling 6
Timer 5
Timespan 6
Toggle & Radio 4
Treelist 7
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Windows
Windows Dark
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos