Why MgPlus ?
MgPlus is specially designed to quickly create a website or a small page with minimal dependencies for better performance and higher productivity
Mg+ (Milligram Plus) was conceived as an enhancement to the Milligram CSS framework : Milligram
The project began in early 2021 with the goal of providing a more robust and feature-rich alternative while maintaining the minimalistic approach of Milligram.
The project has seen multiple releases, each aimed at improving performance, flexibility, and ease of use.Core concepts
Mg+ is designed to be simple and intuitive. Here are some core concepts to keep in mind:
- Minimalism: Mg+ provides only the essential styles, allowing you to build on top of it without unnecessary bloat.
- Flexibility: MgPlus is highly customizable, enabling you to tweak the styles to match your design requirements by using css variables
- Performance: Mg+ is lightweight, ensuring fast load times and optimal performance.
- Responsive: MgPlus is fully responsive, adapting to various screen sizes and devices with ease.
- Dark mode: Mg+ comes with a built-in dark mode feature, allowing you to switch between light and dark themes with a single click.
- Compatibility: MgPlus is compatible with all modern browsers, ensuring a consistent experience for all users.
- Open source: Mg+ is an open-source project, licensed under the MIT License, allowing you to use it for personal and commercial projects without any restrictions.
Library size comparison
Components
Mg+ comes with a range of features to help you build beautiful websites quickly and easily. Some of the key features include:
- Typography: A set of typography styles to help you create beautiful and readable text.
- Responsive grid: A flexible grid system that adapts to various screen sizes.
- Forms components: Stylish form elements that are easy to customize and integrate into your design.
- Buttons: A variety of button styles to suit different use cases and design requirements.
- Alerts: Alert styles to notify users of important information or actions.
- Badges: Badges to highlight important content or provide additional context.
- Dropdowns: Dropdown menus to create interactive navigation elements.
- Colors: A range of color classes to help you style your elements with ease.
- Icons: An Icon system and included set of icons to enhance the visual appeal of your website.
Utilities
In addition to components, Mg+ provides a set of utility classes to help you quickly style your elements. These include:
- Spacing: Margin and padding utilities to control the spacing around elements.
- Typography: Text alignment, font size, and font weight utilities.
- Display: Utilities to control the display property of elements.
- Flexbox: Flexbox utilities to create flexible and responsive layouts.
Getting Started
To get started with Mg+, include this CSS file from our CDN in your project and start using the predefined classes to style your elements. You can also customize the styles to fit your needs.
Quick start (statics websites)
To quickly get started with Mg+, follow these steps:
- Include the Mg+ CSS file in the
section of your HTML file to apply the default styles:
- Include Mg+ plugins at the end of your page to allow user ui interactions (optional) styles:
- Start using the predefined classes in your HTML elements. For example, to create a button, you can use:
Customizable css variables
To customize Mg+ variables, just override the root variables. For example:
:root { --mg-primary-color: #3498db; --mg-secondary-color: #2ecc71; --mg-control-radius: 1.5rem; --mg-input-radius: 1.5rem; --mg-control-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2); }
JS Plugin configuration (optional)
For interactive components like dropdowns, tabs, modals, etc. You can include the Mg+ JS file in your project to enable these features. The JS file is optional and can be included based on your requirements.
This vanilla plugin could be replaced easily by another JS UI Framework like : Angular, React, Vue, Svelte, Solid, etc.Auto register all plugins
Just add following script at the end of your page
Register specific plugins
Just add following script at the end of your page with required plugin names to register separated by a comma
To allow plugin works for your mgplus css components Add html attribute data-toggle=["plugin_name"] in your html components
Example:
- Audi
- BMW
- Citroen
List of available plugins
- navs
data-toggle="nav"
- dropdowns
data-toggle="dropdown"
- tabs
data-toggle="tabs"
- modals
data-toggle="modal"
- collapses
data-toggle="collapse"
- darkmode (enabled globally in your page)
Configure DarkMode
In your main html document page, set data theme value among those
data-theme=["dark"|"light"|"auto"]
"auto" mode will use your system browser preference to choose dark or light mode
Js extensions are required only to handle interactions with dom events for navs, tabs, dropdowns, modals, etc. It could be replaced by creating a wrapped UI components with react, angular or other any UI frameworkCustomization
MgPlus provides a set of CSS variables that allow you to customize the look and feel of your application. Below is a list of all available variables and their default values.
Colors
--mg-color-dark
: hsl(255deg 0% 5%)
--mg-color-light
: hsl(255deg 0% 95%)
--mg-color-primary
: #475dca
--mg-color-red
: #dc3545
--mg-color-orange
: #fd7e14
--mg-color-blue
: #007bff
--mg-color-green
: #28a745
--mg-color-initial
: var(--mg-color-light)
--mg-color-secondary
: hsl(255deg 0% 20%)
--mg-color-tertiary
: hsl(255deg 0% 40%)
--mg-color-quaternary
: hsl(255deg 0% 60%)
--mg-color-quinary
: hsl(255deg 0% 90%)
Dark Mode Colors
--mg-dark-color-initial
:
var(--mg-color-dark)
--mg-dark-color-secondary
:
hsl(255deg 0% 80%)
--mg-dark-color-tertiary
:
hsl(255deg 0% 70%)
--mg-dark-color-quaternary
:
hsl(255deg 0% 50%)
--mg-dark-color-quinary
:
hsl(255deg 0% 25%)
Typography
--mg-base-font-size
: 1.6rem
Borders and Shadows
--mg-control-radius
: 1rem
--mg-input-radius
: 1rem
--mg-control-shadow
:
0 0 2px rgb(0 0 0 / 20%), 0 3px 4px rgb(0 0 0 / 15%)
--mg-control-active-shadow
:
inset 0 0 100px 100px rgb(0 0 0 / 10%)
Grid
--mg-grid-gutter
: 0.5rem
Z-Index
--mg-zindex-0
: 1
--mg-zindex-1
: 100
--mg-zindex-2
: 200
--mg-zindex-3
: 300
--mg-zindex-4
: 400
--mg-zindex-5
: 500
--mg-zindex-max
: 999
Explore the various examples provided in the documentation to see how you can use Mg+ to build your web interface. Each example demonstrates the usage of different components and utilities to help you get started quickly.
We hope you find Mg+ useful and easy to work with. Happy coding!
Base elements
These elements include typography, colors, and other basic components that are used throughout the application.
Typography
The base type is 1.6rem (16px) over 1.6 line height (24px)
Anchor Emphasis Small Strong UnderlineHeading h1
Heading h2
Heading h3
Heading h4
Heading h5
Heading h6
Text Text Text Text Text Text Text TextBlockquotes
Yeah!! Milligram is amazing.
Lists
- Unordered list item 1
- Unordered list item 2
- Unordered list item 3
- Unordered list item 4
- Ordered list item 1
- Ordered list item 2
- Description list item 1
- Description list item 1.1
Tables
Name | Age | Height | Location |
---|---|---|---|
Stephen Curry | 27 | 1,91 | Akron, OH |
Klay Thompson | 25 | 2,01 | Los Angeles, CA |
Codes
{
"jsonSample": true,
"jsonObject": {
"jsonKey": "jsonValue"
},
"text": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quisquam, voluptate.",
}
Alert
mg-alert
Combine the mg-alert
class with other classes to create different types of alerts.
You can use the mg-alert
class to create a basic alert box, and then add additional classes
to change its appearance. The following classes are available:
mg-alert danger
, mg-alert success
, mg-alert warning
.
You can also add an icon to the alert box by using the mg-icon
class.
The icon can be closed by using the icon-close
class.
Badges
Combine the mg-badge
class with other classes to create
different types of badges. You can use the mg-badge
class to
create a basic badge, and then add additional classes to change its
appearance. The following classes are available:
mg-badge danger
, mg-badge success
,
mg-badge warning
. You can also use the mg-text-s
,
mg-text-m
, mg-text-l
, and
mg-text-xl
classes to change the text size.
Default appearance
With custom text sizing
Check
mg-check
You will find examples of checkboxes in their default, checked, and disabled states.
Collapse
mg-collapse + opened
Collapsible elements are used to hide or show content based on user interaction. Below, you will find examples of collapsible elements in their default state, as well as examples of how to trigger the collapse and expand functionality.
Place mg-collapse
class to a clickable element
Place mg-collapse--content
just after the clickable element
Adding opened
class to mg-collapse
will toggle visibility of the collapsible content inside
mg-collapse--content
Place special inline icon mg-icon-collapse
to reflect state of collapsible content
Collapsible navs
Here is a composition of navs and collapse elementsColors
MgPlus provides a set of predefined colors that you can use throughout your application. These colors can be customized for both light and dark modes
Light Mode Colors
Here are the main colors available in light mode (default)
mg-bg-primary
mg-bg-initial
mg-bg-secondary
mg-bg-tertiary
mg-bg-quaternary
mg-bg-quinary
Basic Colors
Here are some basic colors available:
mg-bg-red
mg-bg-orange
mg-bg-blue
mg-bg-green
Dark Mode Colors
In addition, you can customize the equivalent of these colors for dark mode:
--mg-dark-color-initial: var(--mg-color-dark); --mg-dark-color-secondary: hsl(255deg 0% 80%); --mg-dark-color-tertiary: hsl(255deg 0% 70%); --mg-dark-color-quaternary: hsl(255deg 0% 50%); --mg-dark-color-quinary: hsl(255deg 0% 25%);
Dark Mode Conditional Hidden Effects
Automatically hide or show an element according to the current theme color. This is useful when you need to adapt an element or image in dark or light mode.
mg-hidden-dark
mg-hidden-light
Dropdown
Place mg-dropdown
as container class
Inside mg-dropdown
place a button element with special icon
mg-icon-dropdown
Place mg-dropdown--content
after button element
Usualy, place a mg-nav
component inside
mg-dropdown--content
to build a menu
- Audi
- BMW
- Citroen
- Ford
- Honda
- Jaguar
- Land Rover
- Mini
- Nissan
- Toyota
- Volvo
Positioning options
mg-dropdown--content
+ [mg-left|mg-right]
Add to mg-dropdown--content
mg-left
or
mg-right
to adjust left or right content according to the
button position
- Audi
- BMW
- Mercedes long! very very long!
- Audi
- BMW
- Mercedes long! very long!
Forms
Below, you will find examples of form elements in their default state, as well as examples of how to trigger the form functionality.
You can use grid system classes to create responsive form layouts.
Place mg-col
class to a fieldset element to create a form
section.
Place mg-inline-flex
class to a div element to create inline
inputs.
Place mg-row
class to a div element to create a row of form
elements.
Group
Place mg-group
class to a div element to create a group of
buttons or inputs.
mg-group
preserves the visual coherence of grouped elements whatever the size or rounding of the elements.
Css helpers
CSS helpers are used to quickly apply styles to elements. Below, you will find examples of how to use CSS helpers to style various elements and components.
Positioning
Padding
.mg-pad[0-10]
{ padding: [0-10]rem; }
.mg-pad-l[0-10]
{ padding-left: [0-10]rem; }
.mg-pad-r[0-10]
{ padding-right: [0-10]rem; }
.mg-pad-b[0-10]
{ padding-bottom: [0-10]rem; }
.mg-pad-t[0-10]
{ padding-top: [0-10]rem; }
Marging
.mg-marg[0-10]
{ margin: [0-10]rem; }
.mg-marg-l[0-10]
{ margin-left: [0-10]rem; }
.mg-marg-r[0-10]
{ margin-right: [0-10]rem; }
.mg-marg-b[0-10]
{ margin-bottom: [0-10]rem; }
.mg-marg-t[0-10]
{ margin-top: [0-10]rem; }
.mg-marg-auto
{ margin: auto; }
Placing
.mg-fit
{ min-width: 100%; }
.mg-fixed-top
{ vertical-align: middle; }
.mg-relative
{ position: relative; }
.mg-fixed
{ position: fixed; }
.mg-static
{ position: static; }
.mg-sticky
{ position: sticky; }
.mg-fixed-top
{ position: fixed; top: 0; left: 0; z-index: 999; }
.mg-fixed-bottom
{ position: fixed; bottom: 0; left: 0; z-index: 999; }
.mg-top
{ top: 0; }
.mg-bottom
{ bottom: 0; }
.mg-right
{ float: right; right: 0; }
.mg-left
{ float: left; left: 0; }
.mg-center
{ left: 50%; transform: translateX(-50%);}
.mg-middle
{ top: 50%; transform: translateY(-50%); }
.mg-top-left
{ top: 0; left:0; }
.mg-top-right
{ top: 0; right:0; }
.mg-bottom-left
{ bottom: 0; left:0; }
.mg-bottom-right
{ bottom: 0; right:0; }
.mg-text-center
{ text-align: center; }
.mg-text-right
{ text-align: right; }
.mg-text-left
{ text-align: left; }
Sizing
width and height
.mg-w[0-10]
{ width: [0-10]rem; }
.mg-h[0-10]
{ height: [0-10]rem; }
.mg-min-w[0-10]
{ min-witdh: [0-10]rem; }
.mg-min-h[0-10]
{ min-height: [0-10]rem; }
.mg-max-w[0-10]
{ max-width: [0-10]rem; }
.mg-max-h[0-10]
{ max-height: [0-10]rem; }
.mg-w[0-100]vh
{ width: [0-100]vh; }
.mg-h[0-100]vh
{ height: [0-100]vh; }
.mg-min-w[0-100]vh
{ min-witdh: [0-100]vh; }
.mg-min-h[0-100]vh
{ min-height: [0-100]vh; }
.mg-max-w[0-100]vh
{ max-width: [0-100]vh; }
.mg-max-h[0-100]vh
{ max-height: [0-100]vh; }
Visibility
.mg-block
{ display: block; }
.mg-inline-block
{ display: inline-block; }
.mg-inline
{ display: inline; }
.mg-none
{ display: none; }
.mg-show
{ visibility: visible; opacity:1; }
.mg-clearfix
{ transform: scale(1); }
.mg-shadow
{ box-shadow: $control-shadow; }
.mg-overflow-auto
{ overflow: auto; }
.mg-overflow-x-auto
{ overflow-x: auto; }
.mg-overflow-y-auto
{ overflow-y: auto; }
.mg-overflow-x-hidden
{ overflow-x: hidden; }
.mg-overflow-y-hidden
{ overflow-y: hidden; }
.mg-visible
{ visibility: visible; }
.mg-hidden
{ visibility: hidden;}
Borders
.mg-rounded[0-10]
{ border-radius: [0-10]rem;}
.mg-rounded-tl[0-10]
{ border-top-left-radius: [0-10]rem;}
.mg-rounded-tr[0-10]
{ border-top-right-radius: [0-10]rem;}
.mg-rounded-br[0-10]
{ border-bottom-right-radius: [0-10]rem;}
.mg-rounded-bl[0-10]
{ border-bottom-left-radius: [0-10]rem;}
.mg-rounded-none
{ border-radius: 0;}
.mg-rounded-full
{ border-radius: 100%;}
.mg-border
{ border: 0.07rem solid $color-quaternary; }
.mg-border-none
{ border: none; }
.mg-border-t
{ border-top: 0.07rem solid $color-quaternary; }
.mg-border-r
{ border-right: 0.07rem solid $color-quaternary; }
.mg-border-b
{ border-bottom: 0.07rem solid $color-quaternary; }
.mg-border-l
{ border-left: 0.07rem solid $color-quaternary; }
z-index (0 to 500 step 100)
.mg-z[0-5]
{ z-index: [0-500];}
.mg-z-full
{ z-index: 999;}
Text
.mg-text-left
{ text-align: left; }
.mg-text-right
{ text-align: right; }
.mg-text-center
{ text-align: center; }
.mg-text-justify
{ text-align: justify; }
.mg-text-nowrap
{ white-space: nowrap; }
.mg-text-lowercase
{ text-transform: lowercase; }
.mg-text-uppercase
{ text-transform: uppercase; }
.mg-text-capitalize
{ text-transform: capitalize; }
.mg-text-underline
{ text-decoration: underline; }
.mg-text-linethrough
{ text-decoration: linethrough; }
.mg-text-overline
{ text-decoration: overline; }
.mg-text-none
{ text-decoration: none; }
.mg-text-break
{ word-break: break-all; }
.mg-text-ellipsis
{ overflow: hidden; text-overflow: ellipsis; white-space:
nowrap;}
.mg-text-clip
{ overflow: hidden; text-overflow: clip; white-space: nowrap; }
.mg-text-
[s-m-l-xl-2xl-3xl-4xl-5xl] { font-size: $base-font-size*N; }
.mg-text-bold
{ font-weight: bold; }
.mg-text-bolder
{ font-weight: bolder; }
.mg-text-lighter
{ font-weight: lighter; }
Icons
Included icons (pure css)
Navigation
The icons are categorized into different groups based on their usage. Below, you will find examples of navigation icons and action icons, all implemented using pure CSS.
Actions
Icon sizing (s to 5xl)
Additionally, we demonstrate the different sizes available for these icons, ranging from small (s) to 5 extra-large (5xl). This ensures that the icons can be used in a variety of contexts and maintain visual consistency across the application.
Sizing with external icons (svg)
Icon integration
Buttons
We provide examples of buttons with inline icons, as well as buttons that use SVG icons. These examples demonstrate how icons can be seamlessly integrated into button elements to enhance usability and visual appeal.
Badges
We provide examples of badges with inline icons, as well as badges that use SVG icons. These examples demonstrate how icons can be seamlessly integrated into badge elements to enhance usability and visual appeal.
Inputs
MgPlus provides a variety of input styles to enhance user experience
Different sizing and icon integration options are available to accommodate various design needs
Input sizing
Styled inputs
Loader
Loaders are used to indicate that a process is in progress. Below, you will find examples of how to use the loader system to create a variety of loading states.
Place mg-loader
class to a div element to create a loader.
Place mg-loader--status
just after mg-loader class to a div
element to create a loading status message.
If needed place mg-loader--result
class to a div element to
create a loading result message after the loading process is completed.
Modal
A Modal is composed by a trigger button and a modal content window. The modal content window is hidden by default and can be displayed by clicking the trigger button.
To create a modal, you need to use the following classes:
mg-modal
for the modal content window,
mg-modal--content
for the content inside the modal, and
mg-modal--body
for the body of the modal.
If you use MgPlus JS plugins just add the following attributes to the
trigger button to open the modal:
data-toggle="modal"
and
data-target="id-of-modal-content"
Otherwise to toggle visibility of the modal, you need to add dynamically
opened
class to mg-modal element when you want to open it
(usually on click)
mg-modal opened
This is a modal window. You can do the following things with it:
Default modal with overflow
- Audi
- BMW
- Citroen
- Ford
- Honda
- Jaguar
- Land Rover
- Mini
- Nissan
- Toyota
- Volvo
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur euismod tortor eget magna auctor, eu hendrerit ipsum mattis. Etiam vitae ligula nulla. Nulla facilisi. Maecenas eu orci ac erat mollis fringilla. Donec semper, metus vitae laoreet fringilla, nisl velit auctor ligula, vitae hendrerit lectus elit eu tellus. Mauris finibus, ante quis malesuada interdum, odio massa scelerisque eros, ac iaculis tellus turpis vitae dolor. Nullam id diam eu tellus dictum tempor. Vestibulum finibus eros vitae pretium varius.
Aenean in ex eu ante viverra semper. Nullam at condimentum quam. Sed elit sapien, maximus ac pretium ac, viverra aliquam tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras sed sapien fermentum, elementum mi efficitur, congue tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras malesuada lorem enim, eget scelerisque orci vestibulum a. Proin scelerisque enim nibh, egestas euismod nunc aliquam vel. Pellentesque facilisis lacus tortor, nec dictum augue porttitor nec. Quisque ut lacus eleifend lorem lobortis fermentum nec sit amet lacus. Vestibulum vehicula lobortis lectus ut pellentesque. Nullam tempus in ligula at lacinia. Etiam accumsan eleifend nunc, at rhoncus nulla tincidunt sed. Sed turpis dui, hendrerit vitae finibus ut, luctus quis ligula. Aenean venenatis id diam tempor interdum. Nulla mauris est, lacinia a fermentum at, ullamcorper ut ante.
Suspendisse gravida diam sit amet malesuada interdum. Cras odio ipsum, scelerisque ac auctor ac, rutrum eget elit. Nulla sodales hendrerit leo, eget mattis velit suscipit vitae. Quisque interdum quam at convallis vestibulum. Aenean est ex, lacinia in leo vitae, euismod ullamcorper enim. Donec vulputate odio non metus elementum tincidunt. Integer bibendum ultricies risus a viverra. Fusce mattis turpis justo, non vehicula mauris feugiat vel. Etiam ut mauris ultrices orci aliquam placerat.
Praesent varius ut eros ut sollicitudin. Curabitur vehicula fermentum massa, nec scelerisque diam posuere quis. Etiam ut diam nec quam sollicitudin finibus sit amet in ipsum. Suspendisse cursus in urna eu condimentum. Cras ultricies sed nibh id mollis. Sed gravida ex sed tortor rhoncus malesuada eu non lorem. Cras vel erat tristique, pretium neque nec, sagittis velit. Nulla non iaculis dolor. Aenean a nulla a elit ornare consequat ac fringilla nibh. Praesent volutpat orci tellus, in hendrerit leo imperdiet eget. Aliquam erat volutpat.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque nunc est, convallis ac ultricies sit amet, sagittis ac eros. Morbi gravida interdum sapien, ac elementum orci sollicitudin quis. Donec suscipit arcu non est rutrum cursus vitae eget lacus. Curabitur pulvinar sit amet lectus in efficitur. Pellentesque ultricies ultricies mauris, a ultrices leo sodales vel. Aliquam sapien turpis, egestas eu volutpat at, semper vel ligula. Sed pretium lacus ut tellus blandit, nec ornare sapien varius. Nulla in ornare mi, eu congue libero. Curabitur non urna quis dui eleifend dictum. Vivamus quis enim sem.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur euismod tortor eget magna auctor, eu hendrerit ipsum mattis. Etiam vitae ligula nulla. Nulla facilisi. Maecenas eu orci ac erat mollis fringilla. Donec semper, metus vitae laoreet fringilla, nisl velit auctor ligula, vitae hendrerit lectus elit eu tellus. Mauris finibus, ante quis malesuada interdum, odio massa scelerisque eros, ac iaculis tellus turpis vitae dolor. Nullam id diam eu tellus dictum tempor. Vestibulum finibus eros vitae pretium varius.
Aenean in ex eu ante viverra semper. Nullam at condimentum quam. Sed elit sapien, maximus ac pretium ac, viverra aliquam tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras sed sapien fermentum, elementum mi efficitur, congue tellus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Cras malesuada lorem enim, eget scelerisque orci vestibulum a. Proin scelerisque enim nibh, egestas euismod nunc aliquam vel. Pellentesque facilisis lacus tortor, nec dictum augue porttitor nec. Quisque ut lacus eleifend lorem lobortis fermentum nec sit amet lacus. Vestibulum vehicula lobortis lectus ut pellentesque. Nullam tempus in ligula at lacinia. Etiam accumsan eleifend nunc, at rhoncus nulla tincidunt sed. Sed turpis dui, hendrerit vitae finibus ut, luctus quis ligula. Aenean venenatis id diam tempor interdum. Nulla mauris est, lacinia a fermentum at, ullamcorper ut ante.
Suspendisse gravida diam sit amet malesuada interdum. Cras odio ipsum, scelerisque ac auctor ac, rutrum eget elit. Nulla sodales hendrerit leo, eget mattis velit suscipit vitae. Quisque interdum quam at convallis vestibulum. Aenean est ex, lacinia in leo vitae, euismod ullamcorper enim. Donec vulputate odio non metus elementum tincidunt. Integer bibendum ultricies risus a viverra. Fusce mattis turpis justo, non vehicula mauris feugiat vel. Etiam ut mauris ultrices orci aliquam placerat.
Praesent varius ut eros ut sollicitudin. Curabitur vehicula fermentum massa, nec scelerisque diam posuere quis. Etiam ut diam nec quam sollicitudin finibus sit amet in ipsum. Suspendisse cursus in urna eu condimentum. Cras ultricies sed nibh id mollis. Sed gravida ex sed tortor rhoncus malesuada eu non lorem. Cras vel erat tristique, pretium neque nec, sagittis velit. Nulla non iaculis dolor. Aenean a nulla a elit ornare consequat ac fringilla nibh. Praesent volutpat orci tellus, in hendrerit leo imperdiet eget. Aliquam erat volutpat.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque nunc est, convallis ac ultricies sit amet, sagittis ac eros. Morbi gravida interdum sapien, ac elementum orci sollicitudin quis. Donec suscipit arcu non est rutrum cursus vitae eget lacus. Curabitur pulvinar sit amet lectus in efficitur. Pellentesque ultricies ultricies mauris, a ultrices leo sodales vel. Aliquam sapien turpis, egestas eu volutpat at, semper vel ligula. Sed pretium lacus ut tellus blandit, nec ornare sapien varius. Nulla in ornare mi, eu congue libero. Curabitur non urna quis dui eleifend dictum. Vivamus quis enim sem.
Combine following classes with mg-modal to define orientation:
mg-modal--top | mg-modal--bottom | mg-modal--right | mg-modal--left
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
This is a modal window. You can do the following things with it:
Progress
Progress bars are used to indicate the progress of a process. Below, you will find examples of how to use the progress system to create a variety of progress states.
Radio
Radio buttons are used to select a single option from a list of options. Below, you will find examples of radio buttons in their default state, as well as examples of how to trigger the radio button functionality.
Range
Range sliders are used to select a value from a range of values. Below, you will find examples of how to use the range system to create a variety of range states.
Responsive grids
Grids are used to create a responsive layout for the application. Below, you will find examples of how to use the grid system to create a variety of layouts.
Horizontal aligment
Horizontal alignment can be set using the mg-row
class.
combined with
mg-x--offset[1-12]
mg-x--start
mg-x--center
mg-x--end
mg-x--around
Row sizing and placement
Responsibve Row sizing
Row alignment
Vertical alignment mg-col
Row grow
mg-[x,m,s,l]--grow
Gap
Mg+ uses a modular system to define the gap between elements with rem based unit (0 to 10rem)
mg-gap[0-10]
mg-row-gap[0-10]
mg-col-gap[0-10]
Responsive display
Responsive display classes allow you to show or hide elements based on the screen size. This is useful for creating a responsive layout that adapts to different screen sizes.
no JS required, following rules works only with CSS Resize your browser or switch to virutal mobile mode to check changesHidden effect (s,m,l,xl)
mg-s-hidden
hidden for small screenmg-m-hidden
hidden until medium screenmg-l-hidden
hidden until large screenmg-xl-hidden
hidden until extra large screenDisplay effect (s,m,l,xl)
mg-s-display
display for small screenmg-m-display
display until medium screenmg-l-display
display until large screenmg-xl-display
display until extra large screenProgressive display example
This example demonstrates how elements can be progressively revealed based on the screen size.
Resize your browser or switch to virtual mobile mode to check changesExclusive display example
It shows only icon with current screen size
Resize your browser or switch to virtual mobile mode to check changesSelect
Selects are used to select a single option from a list of options. Below, you will find examples of how to use the select system to create a variety of select states.
Tabs
Tabs are used to display a list of options to the user. Below, you will find examples of how to use the tabs system to create a variety of tab states.
If you use MgPlus JS plugins, just add
data-target="id_of_tab_content"
to tab list menu and
data-toggle="tabs"
to the main container (mg-tabs). This will
allow you to toggle between different tab contents.
Otherwise, you need to implement the tab switching functionality manually
using JavaScript by adding/removing the active
class to
selected item of tab menu and item to the tab content as well.
Timeline
Timelines are used to display a list of events in chronological order. Below, you will find examples of how to use the timeline system to create a variety of timeline states.
mg-timeline
with ul
or ol
lists
mg-timeline-inline
with ul
or ol
lists
Vertical (default)
-
2021Project inception and initial development phase.
-
2022First release
-
2023Enhancement
-
2024Stable release
Vertical ordered
-
2021Project inception and initial development phase.
-
2022First release
-
2023Enhancement
-
2024Stable release
Inline
-
2021Project inception and initial development phase.
-
2022First release
-
2023Enhancement
-
2024Stable release
Inline ordered
-
2021Project inception and initial development phase.
-
2022First release
-
2023Enhancement
-
2024Stable release
Toggle
mg-toggle
Toggles are used to switch between two states. Below, you will find examples of how to use the toggle system to create a variety of toggle states.
The difference between a toggle and a radio button is that a toggle can be switched on or off independently, while a radio button is part of a group where only one button can be selected at a time.
You can combine two or three states in a toggle by changing dynamically
content label of mg-toggle
class using few JS code.