A standard Vite + React app that renders its own data inside the remote
AutoCSS UI — have UI, bring your own data. The app
ships the data; AutoCSS (loaded from https://autocss.com) is the whole UI.
Live: https://autocss-com.github.io/react/
npm install
npm run devnpm run build # → dist/Pushing to main auto-builds and deploys to GitHub Pages via
.github/workflows/deploy.yml.
Starting from a stock npm create vite React app, the whole integration is just
a few small touches:
- Link the AutoCSS styles — add the
https://autocss.com/assets/css/…stylesheets toindex.html. - Make
<app-container>the root — put<app-container></app-container>inindex.htmland mount into it withcreateRoot(document.querySelector('app-container')).Apprenders the AutoCSS scaffold, with your content inside<article>. - Bring your data — fetch it (here
public/data/records.json) and render.
That's it — React needs no extra config for the app-* custom elements.
(Full change history: progress/.)