{"id":48280388,"url":"https://github.com/lukeocodes/tailwind-playground","last_synced_at":"2026-04-04T22:45:03.797Z","repository":{"id":339378713,"uuid":"1161685846","full_name":"lukeocodes/tailwind-playground","owner":"lukeocodes","description":"Browser-based Tailwind CSS v4 playground with Monaco editor, live preview, and dark mode","archived":false,"fork":false,"pushed_at":"2026-02-19T13:03:06.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T23:47:18.006Z","etag":null,"topics":["playground","tailwind","tailwindcss","tailwindcss-v4","webmcp"],"latest_commit_sha":null,"homepage":"https://lukeocodes.github.io/tailwind-playground/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukeocodes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"lukeocodes"}},"created_at":"2026-02-19T11:54:29.000Z","updated_at":"2026-02-19T15:35:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lukeocodes/tailwind-playground","commit_stats":null,"previous_names":["lukeocodes/tailwind-playground"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lukeocodes/tailwind-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeocodes%2Ftailwind-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeocodes%2Ftailwind-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeocodes%2Ftailwind-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeocodes%2Ftailwind-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeocodes","download_url":"https://codeload.github.com/lukeocodes/tailwind-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeocodes%2Ftailwind-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31418270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["playground","tailwind","tailwindcss","tailwindcss-v4","webmcp"],"created_at":"2026-04-04T22:45:02.796Z","updated_at":"2026-04-04T22:45:03.788Z","avatar_url":"https://github.com/lukeocodes.png","language":"JavaScript","funding_links":["https://github.com/sponsors/lukeocodes"],"categories":[],"sub_categories":[],"readme":"# Tailwind v4 Playground\n\nA browser-based [Tailwind CSS v4](https://tailwindcss.com/) playground with a live preview, Monaco editor, and dark mode. No build step — runs entirely in the browser.\n\n**[Try it live](https://lukeocodes.github.io/tailwind-playground/)**\n\n## Features\n\n- **Monaco Editor** with CSS and HTML tabs — full syntax highlighting, autocomplete, and error detection\n- **Live preview** powered by [`@tailwindcss/browser`](https://www.npmjs.com/package/@tailwindcss/browser) (Tailwind v4 JIT in the browser)\n- **Light/dark mode** toggle — synced across editor and preview using semantic color tokens\n- **Responsive viewport controls** — preview at mobile (375px), tablet (768px), desktop (1024px), or full width\n- **Draggable split pane** — resize the editor and preview panels\n- **Canned templates** — Design System, Gradient Hero, Split Hero, Dashboard Cards, Pricing Table\n- **Comprehensive theme editor** — customize colors, border radius, font sizes, shadows, spacing, and more via CSS\n- **WebMCP support** — AI agents can read/write the theme CSS and sandbox HTML via [`navigator.modelContext`](https://webmcp.link/)\n\n## Getting Started\n\nNo install required. Clone and serve:\n\n```bash\ngit clone https://github.com/lukeocodes/tailwind-playground.git\ncd tailwind-playground\nnpx serve .\n```\n\nOr just open `index.html` with any static file server.\n\n## How It Works\n\nThe playground uses Tailwind CSS v4's browser CDN (`@tailwindcss/browser@4`) which runs the JIT compiler directly in an iframe. When you edit the theme CSS or sandbox HTML, the preview updates live.\n\n### Theme CSS\n\nEdit the `@theme` block to customize your design tokens. Changes apply instantly:\n\n```css\n@theme {\n  --color-primary: oklch(0.55 0.2 260);\n  --radius-lg: 0.5rem;\n  --text-base: 1rem;\n  --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.08);\n}\n```\n\nDark mode is handled via semantic color tokens that automatically switch when toggled — no `dark:` prefixes needed in the HTML.\n\n### Sandbox HTML\n\nWrite HTML using Tailwind utility classes. Use the semantic tokens from your theme:\n\n```html\n\u003cdiv class=\"bg-surface text-foreground rounded-lg shadow-md p-6\"\u003e\n  \u003ch1 class=\"text-2xl font-bold text-primary\"\u003eHello\u003c/h1\u003e\n\u003c/div\u003e\n```\n\n## WebMCP\n\nThe playground exposes tools via the [WebMCP](https://webmcp.link/) standard, allowing AI agents to interact with the site programmatically. Available tools:\n\n| Tool | Description |\n|------|-------------|\n| `get_theme_css` | Read the current theme CSS |\n| `set_theme_css` | Replace the theme CSS and refresh the preview |\n| `get_sandbox_html` | Read the current sandbox HTML |\n| `set_sandbox_html` | Replace the sandbox HTML and refresh the preview |\n| `list_templates` | List available canned templates |\n| `select_template` | Load a template by name |\n\nWrite tools automatically focus the browser window so the user can see changes. Requires [Chrome Canary 146+](https://www.google.com/chrome/canary/) with the WebMCP flag enabled, or any browser with the [`@mcp-b/global`](https://www.npmjs.com/package/@mcp-b/global) polyfill (included).\n\n## Tech Stack\n\n| Dependency | Source | Purpose |\n|------------|--------|---------|\n| [Tailwind CSS v4](https://tailwindcss.com/) | CDN | JIT compilation in the browser |\n| [Monaco Editor](https://microsoft.github.io/monaco-editor/) | CDN | Code editing |\n| [Inter](https://rsms.me/inter/) + [JetBrains Mono](https://www.jetbrains.com/lp/mono/) | Google Fonts | Typography |\n| [`@mcp-b/global`](https://www.npmjs.com/package/@mcp-b/global) | CDN | WebMCP polyfill |\n\nZero npm dependencies. Zero build step. ~50KB of application code.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, coding guidelines, and how to add templates.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeocodes%2Ftailwind-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeocodes%2Ftailwind-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeocodes%2Ftailwind-playground/lists"}