--- name: tailwind-plus-elements description: Using TailwindPlus Elements (@tailwindplus/elements) in the Rocky VS Code webviews. Use when building or upgrading an interactive webview component — a command palette / model search, a confirmation dialog, an autocomplete or select model picker, a dropdown/popover menu, a collapsible disclosure, or tabs. Covers the esbuild-bundle install (no CSP change vs the CDN), the --vscode-* theming + Tailwind v4 data-variant nuance, React 19 custom-element interop (boolean attrs, native events via ref, the elements:ready gate), and which element fits which Rocky surface. --- # TailwindPlus Elements in Rocky webviews [TailwindPlus Elements](https://tailwindcss.com/plus) (`@tailwindplus/elements`) is a framework-agnostic library of **headless web components** — ``, ``, ``, ``, ``, ``, ``, `` — that provide accessible, keyboard-friendly interactive behavior with **no styling of their own**. You style them with Tailwind. We hold a Tailwind Plus license; the full per-component API lives in the TailwindPlus account, not in this repo (see "Licensing" below). They slot into the React + Tailwind webviews under `editors/vscode/webview-ui/`. ## When to use this skill - Building a new interactive webview surface: a `Cmd+K` command palette / model search, a confirmation dialog (e.g. the apply-gate), an autocomplete/combobox model picker, a dropdown or popover menu, a collapsible section, or tabs. - Upgrading a hand-rolled webview interaction (e.g. the lineage canvas context menu) to an accessible primitive. - **Not** for the ReactFlow canvas itself (that's `@xyflow/react`), and not a reason to re-skin a surface that already works. ## Install + bundling (no CSP change) Add it as a devDependency in `editors/vscode` and import it **once** from a webview entry — esbuild bundles it into the panel chunk, so it loads under our existing nonce: ```bash npm install -D @tailwindplus/elements # in editors/vscode ``` ```ts // webview-ui/panels//main.tsx — once per entry that uses Elements import "@tailwindplus/elements"; ``` Do **not** add the jsDelivr `