AtroUIAtroUI
  • Getting Started
  • Installation
  • MCP server
  • Coming from…
  • Collections
  • Registry
  • Theming
  • Host APIs
  • Brand kit
  • Identity kit
  • Landing kit
  • Launch workflow
  • For agents
  • Glossary
  • Compare
  • Alternatives hub
  • vs Aceternity UI
  • vs Magic UI
  • Aceternity alternative
  • Magic UI alternative
  • Tailwind Plus alternative
  • Changelog
  • Blog
  • Updates
  • ButtonCLI
  • DialogCLI
  • Alert DialogCLI
  • MenuCLI
  • Context MenuCLI
  • Navigation MenuCLI
  • MenubarCLI
  • PopoverCLI
  • TooltipCLI
  • Preview CardCLI
  • Scroll AreaCLI
  • SeparatorCLI
  • FieldCLI
  • Number FieldCLI
  • OTP FieldCLI
  • FormCLI
  • FieldsetCLI
  • InputCLI
  • TextareaCLI
  • CheckboxCLI
  • Checkbox GroupCLI
  • RadioCLI
  • SwitchCLI
  • ToggleCLI
  • Toggle GroupCLI
  • ToolbarCLI
  • AccordionCLI
  • CollapsibleCLI
  • ComboboxCLI
  • AutocompleteCLI
  • DrawerCLI
  • TabsCLI
  • ToastCLI
  • ProgressCLI
  • SliderCLI
  • MeterCLI
  • AvatarCLI
  • CardCLI
  • Form SelectCLI
  • Motion PlaygroundCLI
  • BreadcrumbsCLI
  • ProseCLI
  • Founder AvatarCLI
  • Theme ToggleCLI
  • Adaptive Theme SwitchCLI
  • Theme ProviderCLI
  • LogoCLI
  • TimelineCLI
  • Fade InCLI
  • StaggerCLI
  • Line RevealCLI
  • Word Reveal ScrollCLI
  • Text MorphCLI
  • Copy ButtonCLI
  • Label RollCLI
  • MagneticCLI
  • TiltCLI
  • SpotlightCLI
  • Animate NumberCLI
  • Transition PanelCLI
  • Scroll ProgressCLI
  • ASCII
  • DonutCLI
  • RainCLI
  • WaveCLI
  • SparkCLI
  • BarCLI
  • BootCLI
  • WordmarkCLI
  • DecodeCLI
  • Site HeaderCLI
  • Site FooterCLI
  • Bold FooterCLI
  • HeroCLI
  • PrincipleCLI
  • WorkCLI
  • CraftsCLI
  • LabCLI
  • WhoCLI
  • PricingCLI
  • Feature GridCLI
  • Logo CloudCLI
  • FAQCLI
  • Contextual CTACLI
  • Exit IntentCLI
  • Calendly EmbedCLI
  • Waitlist FormHost API
  • Newsletter FormHost API
  • JournalCLI
  • Social ShareCLI
  • ResourcesCLI
  • AR PortfolioCLI
  • Made With EmbedCLI
  • Hero ParallaxCLI
  • Hero LampCLI
  • Logo MarqueeCLI
  • Testimonials StackCLI
  • Feature BentoCLI
  • CTA BandCLI
  • Pricing TiersCLI
  • FAQ AccordionCLI
  • Stats BandCLI
  • Integration BeamCLI
  • Showcase CarouselCLI
  • Auth SplitCLI
  • SaaS StarterCLI
  • Landing KitCLI
  • OG ExamplesCLI
  • OG Live PreviewCLI
  • OG WorkspaceHost API
  • Thumbnail PreviewCLI
  • Thumbnail WorkspaceHost API
  • Project PlannerCLI
  • Scope ChatHost API
  • Launch WorkflowCLI
  • Live DashboardCLI
  • Analytics ProviderCLI
AtroUI·Home·Components·Blog·GitHub·Changelog

Kits

Identity kit

AtroUI structures design, brand configuration, and technical SEO as a unified pipeline. Most component registries stop at CSS variables. We provide a complete Brand & SEO Identity Kit — so when you install headers, footers, JSON-LD, or favicons, they pull from a single source of truth and stay in sync.

Core brand config

Instead of hardcoding your product name or canonical URLs across headers, footers, and SEO scripts, we configure them in a single place. Install the brand helper:

bash
npx shadcn@latest add @atroui/brand

This drops lib/brand.ts into your project, resolving environmental overrides or default fallbacks dynamically:

typescript
// lib/brand.ts
export function getBrand() {
  return {
    name: process.env.NEXT_PUBLIC_SITE_NAME || "My SaaS",
    domain: process.env.NEXT_PUBLIC_SITE_DOMAIN || "mysaas.com",
    email: process.env.NEXT_PUBLIC_SITE_EMAIL || "hello@mysaas.com",
    siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://www.mysaas.com",
    tagline: "Own the UI, borrow the API.",
  }
}

To completely rebrand your site chrome, legal notices, and structured data, you only need to configure your environment variables:

bash
NEXT_PUBLIC_SITE_NAME="AstroSaaS"
NEXT_PUBLIC_SITE_DOMAIN="astrosaas.com"
NEXT_PUBLIC_SITE_EMAIL="team@astrosaas.com"
NEXT_PUBLIC_SITE_URL="https://www.astrosaas.com"

Schema.org structured data

For domain resolution in your own JSON-LD (or other structured data), install the registry helper — @atroui/seo drops lib/seo.ts with getSiteDomain() (reads getBrand().domain):

bash
npx shadcn@latest add @atroui/seo
typescript
import { getSiteDomain } from "@/lib/seo"

const domain = getSiteDomain()

Ready-made JSON-LD React components (SiteGraphJsonLd, ArticleJsonLd, etc.) are Host / headless helpers on the npm atroui package — not UI from the registry. Use them when you already depend on Host APIs; they are optional for a registry-only identity setup:

bash
npm i atroui
tsx
// app/layout.tsx — Host helper (optional)
import { SiteGraphJsonLd } from "atroui"

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <SiteGraphJsonLd />
        {children}
      </body>
    </html>
  )
}

For technical docs or long-form developer articles, inject article metadata onto pages dynamically:

tsx
// app/blog/[slug]/page.tsx — Host helper (optional)
import { ArticleJsonLd } from "atroui"

export default function BlogPost({ post }) {
  return (
    <article>
      <ArticleJsonLd
        title={post.title}
        description={post.description}
        slug={post.slug}
        date={post.date}
        basePath="/blog"
      />
      <h1>{post.title}</h1>
    </article>
  )
}

Next.js metadata and canonical paths

Search engines penalize duplicate path strings. To prevent index pollution, ensure a stable metadataBase is set in the root layout metadata so relative paths resolve to the absolute canonical URL automatically.

typescript
// app/layout.tsx
import { Metadata } from "next"
import { getBrand } from "@/lib/brand"

const brand = getBrand()

export const metadata: Metadata = {
  metadataBase: new URL(brand.siteUrl),
  title: {
    default: `${brand.name} - ${brand.tagline}`,
    template: `%s · ${brand.name}`,
  },
  description: "High-performance dark-first component catalog.",
  alternates: {
    canonical: "/",
  },
}

Favicon and SERP checklist

Modern search results display your brand favicon right next to your snippet link. If you only provide a legacy favicon, Google may display a generic globe, lowering organic click-through rates.

To configure your favicons in a Next.js App Router project using AtroUI specifications, place these in your public/ directory:

  • /favicon-96.png — primary Google SERP candidate (square, ≥48).
  • /favicon-48.png, /favicon-192.png — additional PNG sizes.
  • /favicon.ico — multi-resolution ICO including ≥48 frames (Google still probes this path).
  • /icon.svg — crisp browser tabs.
  • /apple-touch-icon.png — 180x180 mobile app tile.

Then, reference them via relative URLs in your layout metadata (PNG before SVG):

typescript
// app/layout.tsx
export const metadata = {
  // ...
  icons: {
    icon: [
      { url: "/favicon-96.png", sizes: "96x96", type: "image/png" },
      { url: "/favicon-48.png", sizes: "48x48", type: "image/png" },
      { url: "/favicon-192.png", sizes: "192x192", type: "image/png" },
      { url: "/icon.svg", type: "image/svg+xml" },
      { url: "/favicon.ico", sizes: "16x16 32x32 48x48 64x64 96x96 128x128 256x256" },
    ],
    apple: [
      { url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" },
    ],
    shortcut: ["/favicon-96.png"],
  },
}

Sitemap and robots

App Router supports automated dynamic sitemaps and search crawler instructions natively. Build your dynamic crawl tree using the dynamic sitemap helper:

typescript
// app/sitemap.ts
import type { MetadataRoute } from "next"
import { getBrand } from "@/lib/brand"

export default function sitemap(): MetadataRoute.Sitemap {
  const brand = getBrand()
  const lastModified = new Date()

  return [
    {
      url: brand.siteUrl,
      lastModified,
      changeFrequency: "weekly",
      priority: 1,
    },
    {
      url: `${brand.siteUrl}/docs`,
      lastModified,
      changeFrequency: "monthly",
      priority: 0.8,
    },
  ]
}

And drop crawler rules into app/robots.ts:

typescript
// app/robots.ts
import type { MetadataRoute } from "next"
import { getBrand } from "@/lib/brand"

export default function robots(): MetadataRoute.Robots {
  const brand = getBrand()
  return {
    rules: {
      userAgent: "*",
      allow: "/",
    },
    sitemap: `${brand.siteUrl}/sitemap.xml`,
    host: brand.siteUrl,
  }
}

Brand is not page content

AtroUI maintains a strict division of data to avoid typical template mistakes:

  • Brand Profile — configured globally via environment variables (getBrand), powering headers, footers, JSON-LD, sitemaps, and default mail handles.
  • Section Copy (CONTENT) — configured locally at the top of individual block files, representing the exact words displayed in marketing components (e.g. `DEFAULT_BRAND` on dynamic heroes).

This boundary ensures your product is immediately indexable on your production URL, with no generic template strings leaking into Google's index.

PreviousBrand kitNextLanding kit
npx shadcn@latest add @atroui/brand
// lib/brand.ts
export function getBrand() {
  return {
    name: process.env.NEXT_PUBLIC_SITE_NAME || "My SaaS",
    domain: process.env.NEXT_PUBLIC_SITE_DOMAIN || "mysaas.com",
    email: process.env.NEXT_PUBLIC_SITE_EMAIL || "hello@mysaas.com",
    siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://www.mysaas.com",
    tagline: "Own the UI, borrow the API.",
  }
}
NEXT_PUBLIC_SITE_NAME="AstroSaaS"
NEXT_PUBLIC_SITE_DOMAIN="astrosaas.com"
NEXT_PUBLIC_SITE_EMAIL="team@astrosaas.com"
NEXT_PUBLIC_SITE_URL="https://www.astrosaas.com"
npx shadcn@latest add @atroui/seo
import { getSiteDomain } from "@/lib/seo"

const domain = getSiteDomain()
npm i atroui
// app/layout.tsx — Host helper (optional)
import { SiteGraphJsonLd } from "atroui"

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <SiteGraphJsonLd />
        {children}
      </body>
    </html>
  )
}
// app/blog/[slug]/page.tsx — Host helper (optional)
import { ArticleJsonLd } from "atroui"

export default function BlogPost({ post }) {
  return (
    <article>
      <ArticleJsonLd
        title={post.title}
        description={post.description}
        slug={post.slug}
        date={post.date}
        basePath="/blog"
      />
      <h1>{post.title}</h1>
    </article>
  )
}
// app/layout.tsx
import { Metadata } from "next"
import { getBrand } from "@/lib/brand"

const brand = getBrand()

export const metadata: Metadata = {
  metadataBase: new URL(brand.siteUrl),
  title: {
    default: `${brand.name} - ${brand.tagline}`,
    template: `%s · ${brand.name}`,
  },
  description: "High-performance dark-first component catalog.",
  alternates: {
    canonical: "/",
  },
}
// app/layout.tsx
export const metadata = {
  // ...
  icons: {
    icon: [
      { url: "/favicon-96.png", sizes: "96x96", type: "image/png" },
      { url: "/favicon-48.png", sizes: "48x48", type: "image/png" },
      { url: "/favicon-192.png", sizes: "192x192", type: "image/png" },
      { url: "/icon.svg", type: "image/svg+xml" },
      { url: "/favicon.ico", sizes: "16x16 32x32 48x48 64x64 96x96 128x128 256x256" },
    ],
    apple: [
      { url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" },
    ],
    shortcut: ["/favicon-96.png"],
  },
}
// app/sitemap.ts
import type { MetadataRoute } from "next"
import { getBrand } from "@/lib/brand"

export default function sitemap(): MetadataRoute.Sitemap {
  const brand = getBrand()
  const lastModified = new Date()

  return [
    {
      url: brand.siteUrl,
      lastModified,
      changeFrequency: "weekly",
      priority: 1,
    },
    {
      url: `${brand.siteUrl}/docs`,
      lastModified,
      changeFrequency: "monthly",
      priority: 0.8,
    },
  ]
}
// app/robots.ts
import type { MetadataRoute } from "next"
import { getBrand } from "@/lib/brand"

export default function robots(): MetadataRoute.Robots {
  const brand = getBrand()
  return {
    rules: {
      userAgent: "*",
      allow: "/",
    },
    sitemap: `${brand.siteUrl}/sitemap.xml`,
    host: brand.siteUrl,
  }
}