Forms for Javascript
Form components you’ll need for building great looking mobile and desktop apps. Shipping 15 distinct elements ranging from inputs to layout helpers.
With useful features for a refined UX, including the following elements:
- Single and multiline text
- Select styling
- Buttons
- Segmented control
- Checkbox and checklist
- Radio buttons
- Switch
- Rating
- Stepper
- Page & typography
- Slider
- Progress
- Alerts
- Notifications
- Notes
Forms demos available for other frameworks.
Viewing demos & code for
Forms - Mobile form
Easily create single column layouts and render mobile forms using the various form elements like buttons, inputs, sliders, radio buttons and more.
Use the global settings to set the theme, localization options and everything that should be the same across your app.
Forms - Desktop form
Use the grid layout to create single and multiple column forms suited for medium and large screens. Don't go overboard with too many columns but make use of the available horizontal space on bigger screens.
Use the global settings for setting the theme, localization options and everything that should be consistent across your app.
Forms - Responsive form
Forms - Custom usage
While using mobiscroll forms on its own is great and easy there are a lot of cases where a mixed solution is required. There are three common approaches we came across that are covered by this example.
-
Use mobiscroll form elements inside your existing forms. This is a common scenario that you can come across. Your page is already functional, designed and you would like to update/change a single piece or add something new. Use a stand-alone element like the
mbsc-switch
in the example. -
Use custom styled elements inside mobiscroll forms. Let's say you mostly use mobiscroll on your pages and forms but you also have custom components that you'd like to apply. In that case you want to turn all enahncements off for that element with the the
data-enhance="false"
property. -
Use mobiscroll form elements outside of an actual form. Also a common use case, think of some content like a couple paragraphs and a subscribe call to action in the middle. Use the stand-alone controls, like
mbsc-input
andmbsc-button
elements.
Forms - Validation
Mobiscroll does not have built in validation mechanism, but provides error state styling. Use the mbsc-err
css class on the form element's container and the mbsc-err-msg
css class on the error message.
Forms - Various fields
Forms - Inline components
Forms - Embedded forms
Forms - Input styling
Forms - Create account
Forms - Sign up
Forms - Log in
Forms - Theming capabilities
Forms can be themed and customized. There are four levels of customization:
- Base themes: Choose between
Mobiscroll
,iOS
,Android Material
andWindows
. - Light or dark: Every theme has a
light
anddark
variant. Setting thethemeVariant
to'auto'
will switch based on system settings. - Custom themes: Use the theme builder to customize the colors and make it match your brand.
- Custom Sass and CSS: If you need further customization, the sky is the limit with Sass and CSS overrides.
You can also see how the other demos look by changing the theme in the floating action bar on the right side (not this example, the themes are hardcoded here).
Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.