👀 Astro + AgnosticUI == 🚀
4 |AgnosticUI lets you create one theme that works across all your frameworks 🎉 👊
5 |├── .gitignore
├── .npmrc
├── .stackblitzrc
├── README.md
├── astro.config.mjs
├── package-lock.json
├── package.json
├── public
├── assets
│ └── logo.svg
└── favicon.ico
├── sandbox.config.json
├── src
├── components
│ ├── ReactCounter.jsx
│ ├── SvelteCounter.svelte
│ ├── Tour.astro
│ └── VueCounter.vue
├── pages
│ └── index.astro
└── styles
│ ├── global.css
│ └── home.css
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist
3 |
4 | # dependencies
5 | node_modules/
6 |
7 | # logs
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 |
12 | # environment variables
13 | .env
14 | .env.production
15 |
16 | # macOS-specific files
17 | .DS_Store
18 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | # Expose Astro dependencies for `pnpm` users
2 | shamefully-hoist=true
3 |
--------------------------------------------------------------------------------
/.stackblitzrc:
--------------------------------------------------------------------------------
1 | {
2 | "startCommand": "npm start",
3 | "env": {
4 | "ENABLE_CJS_IMPORTS": true
5 | }
6 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AstroAgnosticUIStarter
2 |
3 | Experiment leveraging the [Astro](https://astro.build/) starter + [AgnosticUI](https://agnosticui.com/). Renders React, Vue 3, and Svelte components.
4 |
5 | 
6 |
7 | ## 🧞 Commands
8 |
9 | All commands are run from the root of the project, from a terminal:
10 |
11 | | Command | Action |
12 | |:---------------- |:-------------------------------------------- |
13 | | `npm install` | Installs dependencies |
14 | | `npm run dev` | Starts local dev server at `localhost:3000` |
15 | | `npm run build` | Build your production site to `./dist/` |
16 | | `npm run preview` | Preview your build locally, before deploying |
17 |
18 | ## 👀 Want to learn more?
19 |
20 | Feel free to check [our documentation](https://github.com/withastro/astro) or jump into our [Discord server](https://astro.build/chat).
21 |
--------------------------------------------------------------------------------
/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'astro/config';
2 | import vue from '@astrojs/vue';
3 | import svelte from '@astrojs/svelte';
4 | import react from '@astrojs/react';
5 |
6 | export default defineConfig({
7 | integrations: [vue(), react(), svelte()],
8 | server: {
9 | port: 3012,
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@example/starter",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "dev": "astro dev",
7 | "start": "astro dev",
8 | "build": "astro build",
9 | "preview": "astro preview"
10 | },
11 | "devDependencies": {
12 | "@astrojs/react": "^0.1.0",
13 | "@astrojs/svelte": "^0.0.2",
14 | "@astrojs/vue": "^0.0.2",
15 | "astro": "^1.0.0-beta.0"
16 | },
17 | "dependencies": {
18 | "agnostic-react": "^0.1.23",
19 | "agnostic-svelte": "^1.1.15",
20 | "agnostic-vue": "^1.0.24",
21 | "react": "^17.0.2",
22 | "react-dom": "^17.0.2",
23 | "svelte": "^3.46.6",
24 | "uuid": "^8.3.2",
25 | "vue": "^3.2.31"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/public/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
1 | https://rawcdn.githack.com/withastro/astro/main/examples/starter/public/favicon.ico
--------------------------------------------------------------------------------
/sandbox.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "infiniteLoopProtection": true,
3 | "hardReloadOnChange": false,
4 | "view": "browser",
5 | "template": "node",
6 | "container": {
7 | "port": 3000,
8 | "startScript": "start",
9 | "node": "14"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/ReactCounter.jsx:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 | import "agnostic-react/dist/common.min.css";
3 | import "agnostic-react/dist/esm/index.css";
4 | import { Alert, Button } from "agnostic-react";
5 |
6 | export default function ReactCounter() {
7 | const [count, setCount] = useState(0);
8 | const add = () => setCount((i) => i + 1);
9 | const subtract = () => setCount((i) => i - 1);
10 |
11 | return (
12 | <>
13 |
{count}17 | 18 |
{ count }20 | 21 |
AgnosticUI lets you create one theme that works across all your frameworks 🎉 👊
5 |{{ count }}6 | 7 |