The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

problems when theme imported in blazor webassembly


I bought a theme from envato and imported it in a blazor webassembly pwa app. Initially Some functions are working, some are broken. For that i do javascript interop after that they work smoothly. But yesterday, when I checked it for the mobile version (responsive) some javascript functions were not working.
I am sharing a screenshot in which the toggle button activates when the screen changes to mobile size, then the close button does not close the panel of the menu.
Anyone can you help me in that case?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


This is often caused by JavaScript event handlers or theme scripts not being initialized correctly after Blazor WebAssembly renders or re-renders the responsive menu. Since the toggle works but the close button fails specifically at the mobile breakpoint, I’d first inspect whether the close handler is bound to the correct DOM element and whether Blazor is replacing that element after the JavaScript initialization. Re-initializing the theme’s menu script after relevant renders and checking for duplicate or stale event listeners can usually narrow down the issue. Clear, reliable behavior across desktop and mobile is also important for professional HSEQ websites such as where users need to access safety information easily on any device.


 
Deleted comment
 
Deleted comment
 
Deleted comment
 
Deleted comment

Hi,

Unfortunately, we haven't tried to convert our Metronic Blazor Server theme to Blazor Webassembly yet. We will try it and consider adding a new version in upcoming releases.

You need to initialize our main js components globally.

You can check initialization example in file Starterkit/Shared/MasterInit.razor.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.