A minimal, themeable CSS component library. Black and white by default, easy to customise.
npm install github:thisismodest/modest-uiUse the pre-bundled CSS file that contains all styles:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/thisismodest/modest-ui@main/dist/modest-ui.css" />Or with a bundler:
import "modest-ui/dist/modest-ui.css";/* Always include tokens first */
@import "modest-ui/base/tokens.css";
/* Then pick what you need */
@import "modest-ui/components/button/button.css";
@import "modest-ui/components/input/input.css";View the component documentation and examples at thisismodest.github.io/modest-ui
Override CSS custom properties to create your own theme:
:root {
--mdst-color-fg: #000;
--mdst-color-bg: #fff;
--mdst-color-border: #000;
--mdst-color-muted: #666;
--mdst-color-subtle: #f5f5f5;
--mdst-color-focus: #000;
--mdst-color-error: #dc2626;
--mdst-color-success: #16a34a;
--mdst-radius: 0;
--mdst-border-width: 0.0625em;
}Use the Theme Playground to experiment with different themes.
Start a local server to preview components:
npm run devThen open http://localhost:8000
- Create a folder in
components/with your component CSS and apreview.html:
components/
└── my-component/
├── my-component.css
└── preview.html
- Add the import to
index.css:
@import "./components/my-component/my-component.css";- Generate and build:
npm run generate # Updates sidebar in index.html
npm run build # Bundles CSS to dist/See CONVENTIONS.md for component and preview formatting guidelines.
MIT