Consent Manager
ncdai/consent-managerUnverifiedComponent
Cookie and tracking consent banner for Next.js, built on c15t.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Sumeet011/Portfolio/main/public/r/consent-manager.jsonSource
1import {2 ConsentManagerDialog,3 ConsentManagerProvider,4 CookieBanner,5} from "@c15t/nextjs"67import { cn } from "@/lib/utils"8import { buttonVariants } from "@/components/ui/button"910export function ConsentManager({ children }: { children: React.ReactNode }) {11 return (12 <ConsentManagerProvider13 options={{14 mode: "offline",15 consentCategories: ["necessary", "measurement"],16 // ignoreGeoLocation: process.env.NODE_ENV === "development", // Useful for development to always view the banner.17 }}18 >19 <CookieBanner20 theme={{21 "banner.card": {22 noStyle: true,23 className: cn(24 "relative w-full max-w-(--banner-max-width) divide-y overflow-hidden rounded-2xl",25 "bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10 dark:ring-foreground/20"26 ),27 },28 "banner.header.title": {29 noStyle: true,30 className: "text-base leading-none font-medium text-foreground",31 },32 "banner.header.description": {33 noStyle: true,34 className: "text-sm text-muted-foreground",35 },36 "banner.footer": {37 style: {38 "--banner-footer-background-color": "transparent",39 "--banner-footer-background-color-dark": "transparent",40 },41 },42 "banner.footer.reject-button": {43 noStyle: true,44 className: buttonVariants({ variant: "secondary" }),45 },46 "banner.footer.accept-button": {47 noStyle: true,48 className: buttonVariants({ variant: "secondary" }),49 },50 "banner.footer.customize-button": {51 noStyle: true,52 className: buttonVariants({ variant: "default" }),53 },54 }}55 />5657 <ConsentManagerDialog58 theme={{59 "dialog.root": {60 style: {61 "--dialog-height": "100%",62 "--dialog-font-family": "var(--font-sans)",6364 "--dialog-background-color": "var(--background)",65 "--dialog-background-color-dark": "var(--background)",6667 "--dialog-border-width": "0",68 "--dialog-border-color": "var(--border)",69 "--dialog-border-color-dark": "var(--border)",7071 "--dialog-card-radius": "1rem",72 "--dialog-card-shadow":73 "0 0 0 1px var(--dialog-card-shadow-color)",74// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from ncdai
All 48 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Apple Hello Effectapple-hello-effect | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Hindiapple-hello-effect-hindi | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Spanishapple-hello-effect-spanish | ncdai | Components | Unverified | 1 dep | |
| Apple Hello Effect - Vietnameseapple-hello-effect-vietnamese | ncdai | Components | Unverified | 1 dep | |
| Brand Assets Menubrand-assets-menu | ncdai | Components | Unverified | 1 dep | |
| chevrons-up-down-iconchevrons-up-down-icon | ncdai | Components | Unverified | 1 dep | |
| Code Block Commandcode-block-command | ncdai | Components | Unverified | 4 deps · 2 files | |
| Contribution Graphcontribution-graph | ncdai | Components | Unverified | 1 dep |
