Search Components

Search for components and documentation pages.

Custom Component

Theme Toggle

Dark/light mode toggle button with sun/moon icons and hydration-safe rendering.

Preview

Installation

npx shadcn@latest add https://newspapercn-ui.vercel.app/r/theme-toggle.json

Props

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"Button size

References

This is a custom newspapercn-ui component.