To increase the versatility and adoption of @hashintel/refractive, I would like to request support for non-SPA environments. Currently, the library is optimized for client-side frameworks, but providing compatibility for static site generation, Server-Side Rendering (SSR), and integration with frameworks like Astro would significantly broaden the use cases.
Goals:
- Vanilla HTML/CSS Support: Provide a way to utilize Refractive’s design patterns or components without a heavy framework dependency.
- SSR Compatibility: Ensure that components can be rendered on the server without errors (handling
window or document dependencies gracefully).
- Astro Integration: Provide a path for seamless integration within Astro projects (e.g., via Web Components or Astro Islands).
Proposed Implementation Considerations:
- Web Components (Custom Elements): Creating framework-agnostic components as standard Web Components would allow them to be consumed by Vanilla HTML, Astro, and SSR environments natively.
- SSR Hooks: Ensure proper handling of hydration if/when components are used in islands or server-rendered pages.
Impact:
This will allow developers to use Refractive in content-heavy sites, landing pages, and projects that prefer the performance benefits of Astro or static HTML without sacrificing the UI/UX consistency provided by the library.
To increase the versatility and adoption of
@hashintel/refractive, I would like to request support for non-SPA environments. Currently, the library is optimized for client-side frameworks, but providing compatibility for static site generation, Server-Side Rendering (SSR), and integration with frameworks like Astro would significantly broaden the use cases.Goals:
windowordocumentdependencies gracefully).Proposed Implementation Considerations:
Impact:
This will allow developers to use Refractive in content-heavy sites, landing pages, and projects that prefer the performance benefits of Astro or static HTML without sacrificing the UI/UX consistency provided by the library.