Mgplus
MgPlus is a mini CSS library to build efficient web pages
Install / Use
/learn @mgpluscss/MgplusREADME
MgPlus (Mg+)
A micro css library based on milligram to build elegant web pages efficiently

Build pretty websites with just a few drops of css
Striking the perfect balance between features and simplicity
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
MgPlus is specially designed to quickly create a website or a small page with minimal dependencies for better performance and higher productivity
Only one css file, around 70 KB minified
Why mgplus ?
- Easy to use: components are just html markups, no css skills required
- Easy to integrate: just add only one css file in your page
- Easy to extend through css variables
- Lightweight with only essentials features
- Responsive and mobile first design
- Pure css, js only required to handle user interactivity
Features
- Theming with css variables
- Dark mode
- Navs
- Tabs
- Pretty forms inputs
- Badges
- Modals
- Responsive flex grid system
- Responsive display helpers
- Icon helper including embedded css icons
- Styling helpers like tailwindcss for positioning and sizing
- And more ...
Getting started
Quick start
1- Include the Mg+ CSS file in the section of your HTML file to apply the default styles:
<link rel="stylesheet" href="https://cdn.mgpluscss.com/$PACKAGE_VERSION/mgplus.css">
2- (Optional) Include Mg+ plugins at the end of your page to allow dynamic ui interactions (dynamic class toggling)
<script src="https://cdn.mgpluscss.com/$PACKAGE_VERSION/mgplus-vanilla.js?register=all"></script>
3- Start using the predefined classes in your HTML elements. For example, to create a button, you can use:
<button class="mg-button">Click me</button>
Customize
Css variables
:root {
--mg-color-dark: hsl(255deg 0% 5%);
--mg-color-light: hsl(255deg 0% 95%);
--mg-color-primary: #475dca;
--mg-control-radius: 1rem;
--mg-input-radius: 1rem;
--mg-color-red: #dc3545;
--mg-color-orange: #fd7e14;
--mg-color-blue: #007bff;
--mg-color-green: #28a745;
--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%);
--mg-base-font-size: 1.6rem;
//default secondary colors
--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-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%);
}
Developing
Debug source and demo page locally without any custom configuration
Main repository project is now based on Vite to provide best developer experience
Clone the repository
git clone https://github.com/mgpluscss/mgplus.git
Install packages (with yarn, npm, on pnpm)
npm install
Build demo page
npm run build
Run debug demo page with hot reload
npm run dev
Build only the library
Output library will be copied in dist folder
npm run build:lib
License
Licensed under the MIT License.
Related Skills
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
