You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Server-Side Rendering (SSR) Support for Web Components #418
Our Web Components currently don't support server-side rendering, which limits their usage in SSR frameworks like Next.js (our documentation app), Remix, and other modern frameworks. This causes hydration issues, flash of unstyled content (FOUC), and poor SEO for pages using our components.
Expected Behaviour:
Components render correctly on the server without browser APIs
No hydration mismatches when components load on client
Declarative Shadow DOM support for proper SSR
Compatible with Next.js app router and pages router
Improved initial page load performance and SEO
Approach:
Investigate Declarative Shadow DOM (DSD) for SSR compatibility
Add server-side rendering utilities for Web Components (e.g., @lit-labs/ssr if using Lit)
Identify and abstract browser-only APIs (localStorage, window, document) with SSR-safe fallbacks
Add SSR compatibility checks in component lifecycle methods
Test SSR integration with our Next.js documentation app
Document SSR setup and best practices for consumers
Consider creating SSR-friendly React bindings as part of shadcn integration effort
Activity