Tailwind Layouts Save

Collection of Tailwind Layouts

Project README

tailwind-layouts

image

A collection of Tailwind Layouts

Playground

The website includes a client-side playground which allows components to be rendered and tweaked in real-time. The playground uses Split.js to allow resizable editor and live code output.

Editor

tailwind-layouts uses Microsoft's Monaco Editor (more specifically, @monaco-editor/react) to view and edit the component's code.

Live Code

tailwind-layouts uses ESBuild to transform and render the component in real-time. JSX and TypeScript is supported, but the compiled code is transformed into ES2017 for browser compatibility. The compiled code format is also in ESM. The code is then transported to an in-document iframe that performs an ESM HMR-like mechanism.

Since Tailwind only generates classes during build-time, tailwind-layouts instead uses twind to generate classes on runtime, as well as add support for JIT.

CDN Imports

Since the compiled code's format is in ESM, tailwind-layouts allows CDN imports. You can check out Skypack.

Live TypeScript definitions

When importing packages from Skypack or UNPKG, tailwind-layouts will attempt to load the TypeScript declarations of the imported package in real-time, allowing you to have a type-safe environment in the playground.

Source Map

Since ESBuild transforms the input code, it may lose context of what the original source may look like, so it exports a source map information of the source content. However, errors would have a hard time showing what the original source's stack looks like, therefor tailwind-layouts uses source-map-support to shim source map stack traces.

Environments

tailwind-layouts currently supports the following implementations:

Upcoming implemenations:

  • Inferno
  • Vue 2
  • Vue 3 SFC
  • Svelte

License

MIT © lxsmnsyc

Open Source Agenda is not affiliated with "Tailwind Layouts" Project. README Source: lxsmnsyc/tailwind-layouts

Open Source Agenda Badge

Open Source Agenda Rating