Home / Function/ getStyleFromSlug() — ui Function Reference

getStyleFromSlug() — ui Function Reference

Architecture documentation for the getStyleFromSlug() function in route.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  ee90160e_1780_360b_ad3d_44e928bb6566["getStyleFromSlug()"]
  f84ce2ab_6aa7_a8b9_321d_61eb23391030["route.ts"]
  ee90160e_1780_360b_ad3d_44e928bb6566 -->|defined in| f84ce2ab_6aa7_a8b9_321d_61eb23391030
  83c25505_7f37_8de5_8ec4_c74ef4ddd9c5["GET()"]
  83c25505_7f37_8de5_8ec4_c74ef4ddd9c5 -->|calls| ee90160e_1780_360b_ad3d_44e928bb6566
  style ee90160e_1780_360b_ad3d_44e928bb6566 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/llm/[[...slug]]/route.ts lines 10–21

function getStyleFromSlug(slug: string[] | undefined, fallbackStyle: string) {
  // Detect base from URL: /docs/components/base/... or /docs/components/radix/...
  if (slug && slug[0] === "components" && slug[1]) {
    if (slug[1] === "base") {
      return "base-nova"
    }
    if (slug[1] === "radix") {
      return "new-york-v4"
    }
  }
  return fallbackStyle
}

Subdomains

Called By

Frequently Asked Questions

What does getStyleFromSlug() do?
getStyleFromSlug() is a function in the ui codebase, defined in apps/v4/app/(app)/llm/[[...slug]]/route.ts.
Where is getStyleFromSlug() defined?
getStyleFromSlug() is defined in apps/v4/app/(app)/llm/[[...slug]]/route.ts at line 10.
What calls getStyleFromSlug()?
getStyleFromSlug() is called by 1 function(s): GET.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free