命令面板

搜索要执行的命令…

0GitHub 星标
Components

同意管理器

Next.js 的 Cookie 和跟踪同意横幅,基于 c15t 构建。

这太棒了,真是个圆满的时刻(c15t 的原型其实就用了 shadcn)。也很希望能把它放进我们的文档,并在我们的 Discord 里分享!

Christopher Burnsc15t.com 创始人
Dependencies (1)
Registry (1)

功能

建立在 c15t 之上。

  • 定制主题以匹配 shadcn/ui。
  • 专为Next.js设计,通过c15t docs适应其他框架。

安装

pnpm dlx shadcn@latest add @yourname/consent-manager

用法

使用 ConsentManager 组件包装您的应用程序:

app/layout.tsx
import { ConsentManager } from "@/components/consent-manager"
 
export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ConsentManager>{children}</ConsentManager>
      </body>
    </html>
  )
}

有关自定义和高级用法,请参阅 c15t 的文档。

License and usage

  • Free to use and modify in both personal and commercial projects.
  • Attribution is appreciated but not required.
  • Released under the MIT License.

这个页面对你有帮助吗?

命令面板

搜索要执行的命令…