saadeghi/daisyui · error · Error
Could not find Tailwind Play's Share button. Visible control
Error message
Could not find Tailwind Play's Share button. Visible controls: ${result?.labels?.join(", ") || "none"} What it means
Thrown by clickShare when no visible button, anchor, or [role=button] matched any of the Share-button heuristics (aria-label/title equal to "share", text equal to/starting with "share", or a \bshare\b regex). The error lists up to 30 visible control labels so you can see what the toolbar actually contained.
Source
Thrown at packages/tailwind-play-share/index.mjs:838
.map(normalize)
.some((value) => /\bshare\b/.test(value)),
);
if (!target) {
return {
ok: false,
labels: candidates
.map((element) => normalize(element.textContent || element.getAttribute("aria-label")))
.filter(Boolean)
.slice(0, 30),
};
}
target.click();
return { ok: true };
})()`,
)
if (!result?.ok) {
throw new Error(
`Could not find Tailwind Play's Share button. Visible controls: ${result?.labels?.join(", ") || "none"}`,
)
}
}
async function readShareState(client) {
return evaluate(
client,
String.raw`(() => {
const visible = (element) => {
const rect = element.getBoundingClientRect();
const style = getComputedStyle(element);
return rect.width > 0 && rect.height > 0 && style.visibility !== "hidden" && style.display !== "none";
};
const values = [...document.querySelectorAll("input,textarea")]
.filter(visible)
.map((element) => element.value)
.filter((value) => typeof value === "string" && value.includes("play.tailwindcss.com"));View on GitHub (pinned to 42b09e637e)
Solutions
- Update tailwind-play-share; the share-button matcher is coupled to Tailwind Play's toolbar markup.
- Raise --timeout so the toolbar is present before the share click runs.
- Run with --verbose/--headed and inspect the visible-control labels in the error.
- Retry once; toolbar render races cause this.
Defensive patterns
Strategy: try-catch
Try / catch
try {
url = await createTailwindPlay(inputs)
} catch (error) {
if (error.message.startsWith("Could not find Tailwind Play's Share button")) {
// the message lists visible toolbar labels - compare against current UI
}
throw error
} Prevention
- Update tailwind-play-share when Tailwind Play changes its toolbar.
- Raise --timeout so the toolbar renders before the share click.
- Use --verbose/--headed and inspect the listed visible control labels.
When it happens
Trigger: evaluate() in clickShare returns result.ok falsy because the candidates filter chain found no matching element, so it returns { ok: false, labels: [...] }.
Common situations: Tailwind Play renamed or restructured its Share control (e.g. moved it into a menu, changed the label/localized it), the toolbar had not rendered yet, or an A/B test changed the button.
Related errors
- Could not find Tailwind Play's ${label} editor tab
- ${description}
- Tailwind Play's editor did not accept the paste event: ${JSO
- Could not focus Tailwind Play's ${label} editor.${diagnostic
- Timed out waiting for Tailwind Play to create a share URL.${
AI-assisted analysis of saadeghi/daisyui@42b09e637e (2026-08-13).
Data as JSON: /api/errors/f6d027136ed39a1f.
Report an issue: GitHub.