Skip to content

fix(examples): Tailwind 4 auth-demo restyle, component gallery and screenshot script - #48

Merged
spacedevin merged 3 commits into
mainfrom
feat/modern-ui
Oct 13, 2026
Merged

spacedevin merged 3 commits into
mainfrom
feat/modern-ui

Conversation

@spacedevin

Copy link
Copy Markdown
Member

The demo's sign-in modal rendered nearly unstyled. auth-demo had a v3-style tailwind.config.ts whose content glob pointed at the SDK's dist, and Tailwind 4 ignores that file.

Needs the SDK release from hyperyai/hypery-sdk#36 (@hyperyai/sdk/styles.css and @hyperyai/sdk/testing). Until it's published, the build fails on those imports. package.json keeps the published ^1.0.0 range; it was verified against a local npm pack of that branch.

Changes

  • Tailwind 4, CSS-first. tailwind.config.ts is gone. app/globals.css uses @import "tailwindcss", Hypery's design tokens and @theme inline. The layout imports @hyperyai/sdk/styles.css once.
  • Redesign. Every page is redesigned in the hypery.ai look, light and dark:
    • a shared header with nav, a theme toggle, and AuthButton / UserButton;
    • an overview page with ModernAuthForm;
    • the components page, with Preview/Code tabs and copyable code blocks;
    • the protected, API, modals, checkout and callback pages.
  • /gallery. Every SDK component in its own data-shot frame, signed in as a sample user ("Ada Lovelace") through HyperyTestProvider, with sample gateway data, so it works without an account. ?theme=light|dark picks the theme and ?shot=<name> shows one component.
  • scripts/screenshots.mjs (npm run screenshots -- <out-dir>). Playwright, using the installed Chrome. It captures each frame in light and dark at 2x, tightly cropped on a transparent background with the full shadow. It's how the SDK's docs/images are made. playwright is a dev dependency.
  • lucide-react is a direct dependency for the demo's icons.

npm run build passes.

The demo kept a v3-style tailwind.config.ts whose content glob pointed at the
SDK's dist; Tailwind 4 ignores it, so the SDK components rendered unstyled.
The config is gone, globals.css is CSS-first with Hypery's tokens, the app
imports @hyperyai/sdk/styles.css, and every page is redesigned in the
hypery.ai look with light and dark themes. Needs the SDK release that ships
styles.css.
/gallery renders every SDK component in its own frame, signed in as a sample
user through HyperyTestProvider with sample gateway data, with ?theme= and
?shot= to show one at a time. scripts/screenshots.mjs captures each frame in
light and dark at 2x with Playwright, which is how the SDK's docs images are
made.
@spacedevin
spacedevin merged commit a255cfe into main Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant