@superstyling/next
v0.2.0
Published
Next.js integration for Superstyling — SSR, color mode, plugin wrapper
Downloads
30
Maintainers
Readme
@superstyling/next
Next.js integration for Superstyling. Wraps @tamagui/next-plugin and ships a color-mode script for FOUC-free SSR — plus ready-made _document.tsx helpers for the Pages Router and a ColorModeScript server component for the App Router.
Install
yarn add @superstyling/core @superstyling/nextUsage
next.config.mjs:
import { withSuperStyling } from "@superstyling/next";
export default withSuperStyling({
config: "./tamagui.config.ts",
components: ["@superstyling/core"],
})({
// your next config
});App Router — in app/layout.tsx:
import { ColorModeScript } from "@superstyling/next/app";
export default function RootLayout({ children }) {
return (
<html>
<head>
<ColorModeScript />
</head>
<body>{children}</body>
</html>
);
}Pages Router — drop SuperStylingDocument into pages/_document.tsx.
Docs
See the Next.js getting-started guide.
License
MIT
