Copyright Text
vinkas-ui/copyright-textFreeComponent
A copyright text component that displays the copyright information
Live preview
live · rendered by the registry
Rendered by vinkas-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.vinkas.com/r/copyright-text.jsonSource
1import { cn } from "@/lib/utils"23type CopyrightTextProps = {4 companyName: string,5 startYear?: number,6 endYear?: number,7 showRights?: boolean,8 rightsText?: string,9 className?: string,10} & React.ComponentProps<"p">1112export default function CopyrightText({13 companyName,14 startYear,15 endYear = new Date().getFullYear(),16 showRights = true,17 rightsText = "All rights reserved.",18 className,19 ...props20}: CopyrightTextProps) {21 const showStartYear = startYear !== undefined && startYear !== endYear22 const years = showStartYear23 ? `${startYear}\u2013${endYear}`24 : `${endYear}`2526 const name = companyName.trim()27 const needsPeriod = !name.endsWith(".")28 const rights = showRights && rightsText29 ? `${needsPeriod ? "." : ""} ${rightsText}`30 : ""3132 return (33 <p className={cn("text-xs text-muted-foreground", className)} {...props}>34 © {years} {name}{rights}35 </p>36 )37}
Files it writes
More from vinkas-ui
All 7 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Input Copyableinput-copyable | vinkas-ui | Components | Free | 1 dep | |
| Markdown Textmarkdown-text | vinkas-ui | Components | Free | 1 dep | |
| Relative Timerelative-time | vinkas-ui | Components | Free | no deps · 2 files | |
| UTM Linkutm-link | vinkas-ui | Components | Free | no deps |
