Static Color Scheme by setting colorScheme on page Component

function MyPage() {
    return (<>...</>)
}

MyPage.colorScheme = "dark";

export default MyPage;
// Make sure you update _app.(jsx|tsx) file as well.

Next.js Example

Craft your next amazing library using

Harness the full potential of React 18 Server Components!
ColorScheme Preference Select theme
Select dark theme Select light theme

Apply themes locally using targetSelector

ColorScheme Preference Select theme
Select dark theme Select light theme
Fork Me on GitHub