Skip to content

[bug]: Copy Theme code's in the Theme page crashes after selecting "scaled" or "mono" on homepage #7662

@rambodalemi

Description

@rambodalemi

When visiting the main page of the shadcn/ui website, changing the theme to either scaled or mono works initially. However, if you navigate to the /theme page afterward to copy the theme configuration, the site throws a client-side exception and shows an error message:

Application error: a client-side exception has occurred while loading ui.shadcn.com (see the browser console for more information).

This crash consistently occurs after switching to a non-default theme and going to /theme.

Affected component/components

Likely related to the theme switcher and theme configuration system. Possibly components involved in theme loading or persistence.

How to reproduce

Visit https://ui.shadcn.com/

Click on the "Themes" dropdown on the homepage and select either scaled or mono

Navigate to /theme either directly or via the UI

Click on Copy Code

Observe the crash and error message

Codesandbox/StackBlitz link

Not applicable – bug occurs on the official website

Logs

Application error: a client-side exception has occurred while loading ui.shadcn.com

System Info

OS: Windows 11

Browser: Microsoft Edge (Chromium-based)

Also reproduced on Chrome latest

Device: Desktop

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions