reference-test

Compares BlazeUI components against the shadcn/ui reference via programmatic CSS diffing and animation verification.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/rabuckley/blazeui --skill reference-test-rabuckley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reference-test
Source: https://github.com/rabuckley/blazeui/tree/main/.claude/skills/reference-test
Command: npx skills add https://github.com/rabuckley/blazeui --skill reference-test-rabuckley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Blazor component libraries that port styled React components (like shadcn/ui) often drift visually from the reference: wrong Tailwind classes, mismatched DOM structure, broken open/close animations, and Blazor re-render races that reset JS-set styles. Manually eyeballing two apps side by side misses subtle computed-style differences and animation timing bugs. ## Core Features & Use Cases - Programmatic CSS diffing: Extracts computed styles from both the BlazeUI demo app and the shadcn/ui reference app using Playwright, then diffs them via the reftest CLI (batch, verify, diff, inspect commands). - Animation trajectory verification: Compares open/close animation behavior between apps and diagnoses Blazor-specific issues like re-render flicker, data-[closed]:hidden killing CSS animations, and close/reopen race conditions. - Root-cause diagnosis workflow: Guides reading Base UI index.parts.ts and primitive sources to decide whether a fix belongs in the headless component, styled template, demo page, or JS module. - Use Case: After porting the shadcn Dialog component to BlazeUI, run verify dialog to find that the backdrop renders before first open and the close animation flickers, then apply the documented _closedRendered guard and cancellable exit animation fixes. ## Quick Start Ask the assistant to run a reference test comparing the BlazeUI dialog component against the shadcn reference app and report any CSS or animation differences.

Frequently Asked Questions about reference-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare Blazor components against a shadcn/ui reference app?

Start both the BlazeUI demo app and the shadcn reference app, then run the reftest CLI with `pnpm tsx src/cli.ts verify <component>` from tools/reference-test. It extracts computed styles from both apps with Playwright and reports structural and CSS diffs.

How to test open and close animations in Blazor overlay components?

Use the reftest `animate` command to compare animation trajectories between the reference and BlazeUI apps. Also write a Playwright script covering open via trigger, close via button, Escape, backdrop click, and rapid close-reopen, since CSS matches alone do not prove animations work.

Why does my Blazor dialog close animation flicker or restart?

Blazor re-renders reset JS-set inline styles and data attributes on the backdrop, restarting the CSS exit animation. Fix it by rendering the closed state exactly once with a `_closedRendered` flag and letting JS own `data-open`/`data-closed` for animated overlays.

Why do data-[closed]:hidden Tailwind classes break CSS exit animations?

The `hidden` class sets `display: none` immediately when `data-closed` is applied, so the exit animation never plays. Use `data-[closed]:pointer-events-none` instead and hide the element via JS `display: none` in the `animationend` callback.

When should I not use this reference testing approach?

Do not use it for E2E functional testing or unit testing of component logic; it is scoped to visual fidelity, CSS diffs, and animation behavior against the shadcn reference. Use dedicated test projects like BlazeUI.Headless.Tests for behavioral unit coverage.