A visual CSS styling tool that lets you create reusable style mats and apply them to HTML elements through drag-and-drop. Build interfaces faster with an intuitive, code-free approach to styling.
- Features
- Prerequisites
- Installation
- Running the Project
- Project Structure
- How to Use Mat Studio
- Available Scripts
- Tech Stack
- Style Cards (Mats) — Create named style collections with multiple CSS properties (e.g. "Card", "Hero Text", "Accent").
- Smart Property Picker — Browse 90+ CSS properties by category (Typography, Color, Layout, Flexbox, Grid, Spacing, Size, Border, Effects, List/Table).
- Value Suggestions — Get suggested values for each property; search and pick from the list.
- Live Preview — See changes instantly in an iframe; hover and drop targets are highlighted.
- Drag & Drop — Drag a mat card from the left panel onto any element in the preview to apply its styles.
- Element Inspector — Click an element to see which mats are applied; remove individual mats from the inspect panel.
- HTML Editor — Edit your HTML in the "CODE" tab with real-time preview updates.
- Export — Download a single HTML file with all applied styles and classes embedded.
Before you run Mat Studio, ensure you have:
- Node.js — Version 18.x or 20.x (LTS recommended). Check with:
node -v
- npm — Usually comes with Node.js. Check with:
npm -v
If Node.js is not installed, download it from nodejs.org.
Follow these steps exactly to get the project on your machine and install dependencies.
If you have the project as a folder on your computer (e.g. mat-studio):
- Open a terminal (Command Prompt, PowerShell, or your IDE’s integrated terminal).
- Go to the project folder. For example, if the project is at
G:\WebProjects\Mat Studio\mat-studio:On macOS/Linux:cd "G:\WebProjects\Mat Studio\mat-studio"
cd /path/to/mat-studio
If you clone from a Git repository instead:
git clone <repository-url>
cd mat-studioFrom inside the project root (mat-studio), run:
npm install- This reads
package.jsonand installs all dependencies intonode_modules. - Wait until it finishes without errors. You should see something like
added XXX packages.
Optional check that the project is ready:
npm run devIf the dev server starts and you see a local URL (e.g. http://localhost:5173), installation was successful. Press Ctrl+C to stop the server, then continue to the next section to run it properly.
- Open a terminal in the project root.
- Run:
npm run dev
- In the terminal you will see output similar to:
VITE v7.x.x ready in xxx ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose - Open your browser and go to http://localhost:5173 (or the port shown).
- You should see the Mat Studio interface: left panel (Mats / Code), center preview, top bar with "MAT STUDIO" and "EXPORT".
- To stop the server: press Ctrl+C in the terminal.
To build the app for production (static files in dist/):
- In the project root, run:
npm run build
- Wait for the build to complete. You should see something like:
✓ built in xxx ms - Output will be in the
distfolder. You can deploy this folder to any static host (e.g. Netlify, Vercel, or a simple web server).
To test the production build on your machine:
- Build first (if you haven’t already):
npm run build
- Run the preview server:
npm run preview
- Open the URL shown (e.g. http://localhost:4173) in your browser.
- Stop with Ctrl+C.
To run ESLint on the project:
npm run lintFix any reported errors or warnings as needed.
mat-studio/
├── public/
│ └── favicon.png # App favicon
├── src/
│ ├── App.jsx # Main app: mats, preview, HTML editor, bridge script
│ ├── index.css # Global styles and resets
│ └── main.jsx # React entry: mounts App into #root
├── index.html # Single HTML entry; loads /src/main.jsx
├── package.json # Dependencies and npm scripts
├── vite.config.js # Vite config (React plugin)
├── eslint.config.js # ESLint configuration
└── README.md # This file
- Entry:
index.htmlloadssrc/main.jsx, which rendersApp.jsx. - Logic and UI: Almost everything lives in
src/App.jsx(state, CSS DB, picker, mat cards, iframe bridge). - Preview: The app injects a small script into the iframe’s HTML so the preview can handle drag/drop, hover, click-to-inspect, and mat application.
Run npm run dev and open http://localhost:5173 in your browser.
- Create a mat: Click "+ new mat". A new card appears (e.g. "New Mat").
- Edit a mat: Click "edit" on a card. You can:
- Change the mat name (top input).
- Add a property: click "+ add property", then fill property and value.
- Use ⌕ next to property or value to open the picker (browse CSS properties or suggested values). Choose a category for properties, type to search, press Enter to select.
- Remove a property with the × next to that row.
- Finish editing: Click "done".
- In the MATS tab, drag a mat card (do not expand "edit" while dragging).
- Drop it onto any element in the center preview. The element will get the mat’s styles; you’ll see a short green flash and the status text "✓ mat applied".
- Click an element in the preview that has mats applied.
- An inspect panel appears (e.g. bottom-right) showing the tag and list of applied mats.
- Click "remove" next to a mat name to remove that mat from the element only.
- In the left panel, switch to the "{ } CODE" tab.
- Edit the HTML in the textarea. The preview updates as you type (after the iframe reloads with the new HTML).
- Click "⬇ EXPORT" in the top bar.
- A file beautified.html is downloaded, containing the full page HTML with all applied mat classes and the generated
<style>block.
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server (HMR). Use this while developing. |
npm run build |
Build for production; output in dist/. |
npm run preview |
Serve the dist/ build locally (e.g. to test before deploy). |
npm run lint |
Run ESLint on the project. |
- React 19.2
- Vite 7.3 — dev server, build, and preview
- ESLint — linting (no TypeScript; the app is JSX-only)
No UI library or extra runtime dependencies; the UI is built with React components and inline styles for a self-contained, dark-theme interface.
# 1. Go to project folder
cd path/to/mat-studio
# 2. Install dependencies (once)
npm install
# 3. Start development server
npm run dev
# 4. Open in browser
# http://localhost:5173For production: npm run build then deploy the dist/ folder, or run npm run preview to test it locally.