@nkstack/refract-tailwind-editor-action
v0.0.0
Published
Tailwind class editor action for Refract.
Downloads
56
Readme
@nkstack/refract-tailwind-editor-action
Tailwind class editor action for Refract.
Exports split plugin pieces for the unified contract:
tailwindEditorRuntimePlugintailwindEditorServerPlugintailwindEditorPluginBundle
Use framework-specific entrypoints when you only need one side:
- runtime-only:
@nkstack/refract-tailwind-editor-action/runtime - server-only:
@nkstack/refract-tailwind-editor-action/server
Install
pnpm add @nkstack/refract-tailwind-editor-actionBehavior
- Opens a panel on element selection
- Applies optimistic preview (
element.className = next) - Debounces persistence calls to server handler
- Updates static JSX
classNamevia AST transform - Injects editor CSS into plugin panel ShadowRoot via
panelStyles - Mounts Radix portals into runtime-provided
portalContainer
Limitation
Dynamic className expressions are rejected.
Disclaimer
Most of the code in this repository was generated with AI assistance. All generated output was reviewed and supervised by humans.
