importImagefrom"next/image";import{useMode}from"nextjs-darkmode-lite/hooks";functionThemedImage(){const{resolvedMode}=useMode();letsrc;switch(resolvedMode){case"light":src="/light-mode-image.png";break;case"dark":src="/dark-mode-image.png";break;default:src="/default-image.png";break;}...
matches; // 切换动画 async function toggleDark({ clientX: x, clientY: y }: MouseEvent) { const isDark = theme === 'dark'; if (!enableTransitions()) { setTheme(theme === 'light' ? 'dark' : 'light'); return; } const clipPath = [ `circle(0px at ${x}px ${y}px)`, `...
你可以在你的tailwind配置中设置一个暗模式主题,然后使用Nextjs ThemeProvider组件来修改它。下面是来自Lee...
tailwind.config.js 43 changes: 6 additions & 37 deletions 43 README.md Original file line numberDiff line numberDiff line change @@ -1,38 +1,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/ca...
In Next.js, you can use LocalStorage through the window interface, and wrap this around a custom hook to use throughout your code. In this article, I’ll talk through creating something a little simpler, but something very common you might see across the web, a dark mode toggle that’s...
CMS管理后台-Strapi(Open source Node.js Headless CMS) 最近很火的UI集合-shadcn-ui 家喻户晓的CSS框架-Tailwind CSS 包管理工具-pnpm 保姆级开发步骤 创建项目文件夹,创建workspace环境 mkdir blog-project # 创建目录 /Users/luke/Desktop/course/blog-project ...
✨ 1.3.0 RC — Coming soon ⭐ Next.js 15 eCommerce Template ▲ i18n Stripe Shadcn Tailwind Drizzle Zod tRPC TypeScript Clerk Radix UI, Responsive React 18 19 Server Components, Postgres Neon TS ORM, Intl App Router Docs User Actions Kit, SaaS Commerce eCommerce Shop Pricing Payments Da...
import node from '@astrojs/node'; import tailwind from "@astrojs/tailwind"; import remarkToc from 'remark-toc'; import { remarkReadingTime } from './plugins/remark-reading-time.mjs'; // https://astro.build/config export default defineConfig({ ...
CMS管理后台-Strapi(Open source Node.js Headless CMS) 最近很火的UI集合-shadcn-ui 家喻户晓的CSS框架-Tailwind CSS 包管理工具-pnpm 保姆级开发步骤 创建项目文件夹,创建workspace环境 代码语言:javascript 复制 mkdir blog-project # 创建目录/Users/luke/Desktop/course/blog-project ...
👉Next JS Notus- product page 👉Next JS Notus- LIVE Demo Next JS Theme - Notus React. ✨ Next JS Blog A Next.js website starter made with TypeScript, MDX, and Tailwind CSS. Also has a dark/light mode toggle. Perfect for your blog or personal site. ...