Brand
atroui/brandFreeUtility
getBrand() and DEFAULT_BRAND - edit or override with NEXT_PUBLIC_SITE_*.
Install it
npx shadcn@latest add https://atroui.com/r/brand.jsonSource
1/**2 * Brand chrome for copied AtroUI components.3 * Defaults match the docs catalog. Edit DEFAULT_BRAND or set NEXT_PUBLIC_SITE_*.4 */56export type Brand = {7 name: string8 domain: string9 email: string10 siteUrl: string11 tagline: string12}1314export const DEFAULT_BRAND: Brand = {15 name: "AtroUI",16 domain: "atroui.com",17 email: "hello@iamk.xyz",18 siteUrl: "https://www.atroui.com",19 tagline: "Dark-first React and Next.js component library for production UI",20}2122function readEnv(key: string): string | undefined {23 if (typeof process === "undefined" || !process.env) return undefined24 const value = process.env[key]?.trim()25 return value || undefined26}2728export function getBrand(): Brand {29 return {30 name: readEnv("NEXT_PUBLIC_SITE_NAME") ?? DEFAULT_BRAND.name,31 domain: readEnv("NEXT_PUBLIC_SITE_DOMAIN") ?? DEFAULT_BRAND.domain,32 email: readEnv("NEXT_PUBLIC_SITE_EMAIL") ?? DEFAULT_BRAND.email,33 siteUrl: (34 readEnv("NEXT_PUBLIC_SITE_URL") ?? DEFAULT_BRAND.siteUrl35 ).replace(/\/$/, ""),36 tagline: readEnv("NEXT_PUBLIC_SITE_TAGLINE") ?? DEFAULT_BRAND.tagline,37 }38}3940export function getBrandMailto(subject?: string): string {41 const { email } = getBrand()42 if (!subject) return `mailto:${email}`43 return `mailto:${email}?subject=${encodeURIComponent(subject)}`44}
Files it writes
More from atroui
All 82 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Analyticsanalytics | atroui | Utilities | Free | no deps | |
| Project Briefproject-brief | atroui | Utilities | Free | no deps | |
| SEO helpersseo | atroui | Utilities | Free | no deps | |
| Site URLsite-url | atroui | Utilities | Free | no deps | |
| Utilsutils | atroui | Utilities | Free | 2 deps |
