Skip to content

v1.2.2

Choose a tag to compare

@rwbrockhoff rwbrockhoff released this 21 Oct 19:56
· 47 commits to main since this release
1718889

Summary

Adds server-side rendering support to prevent theme flash on initial page load.

What's New

  • SSR Support: ArtifactScript component sets theme attributes before render to eliminate flash
  • Framework Compatibility: Works with Next.js App Router, Remix, and other SSR frameworks

New Components:

  • ArtifactScript component for SSR environments

Usage:
Add ArtifactScript to your document <head> before other content:

import { ArtifactScript } from '@artifact-ui/core';

export default function RootLayout({ children }) {
  return (
    <html>
	  <head>
	    {/* Props should match between Script + Provider */}
	    <ArtifactScript accent="obsidian" radius="medium" />
	  </head>
	  <body>
	    <ArtifactProvider accent="obsidian" radius="medium">
		  {children}
	    </ArtifactProvider>
	  </body>
    </html>
  );
}