@chirag127/astro-md3
v1.0.0
Published
Astro integration for Material Design 3 dark-first CSS tokens
Maintainers
Readme
@chirag127/astro-md3
Astro integration — injects MD3 dark-first CSS tokens globally.
Install
npm i @chirag127/astro-md3Usage
astro.config.mjs:
import { defineConfig } from 'astro/config'
import md3 from '@chirag127/astro-md3'
export default defineConfig({
integrations: [md3()]
})All --md-* custom properties are then available on :root across every page.
Tokens included
- Surface hierarchy:
--md-surface,--md-surface-container-* - Color roles:
--md-primary,--md-secondary,--md-tertiary,--md-error - Elevation:
--md-elevation-0…--md-elevation-5 - Shape:
--md-shape-xs…--md-shape-full - Typography:
--md-font-display,--md-font-body,--md-font-mono - Spacing:
--md-space-1…--md-space-16 - Compat aliases:
--bg,--primary,--t-1,--font-sans, etc. - Utility classes:
.md-card,.md-btn-*,.md-chip,.md-badge,.md-nav-rail
Seed: purple #D0BCFF, surface #0F0D13 (MD3 baseline dark).
License
MIT
