Home / File/ code-tabs.tsx — ui Source File

code-tabs.tsx — ui Source File

Architecture documentation for code-tabs.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx ComponentRegistry UIPrimitives 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  050bc3c6_116b_7709_e9e7_72305565e6b0["code-tabs.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  050bc3c6_116b_7709_e9e7_72305565e6b0 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  8c6845ea_e0db_55db_4a65_df2f64d9e581["use-config"]
  050bc3c6_116b_7709_e9e7_72305565e6b0 --> 8c6845ea_e0db_55db_4a65_df2f64d9e581
  699f76b5_9b45_8d21_7fd0_f3e642c5c848["tabs"]
  050bc3c6_116b_7709_e9e7_72305565e6b0 --> 699f76b5_9b45_8d21_7fd0_f3e642c5c848
  style 050bc3c6_116b_7709_e9e7_72305565e6b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"

import { useConfig } from "@/hooks/use-config"
import { Tabs } from "@/registry/default/ui/tabs"

export function CodeTabs({ children }: React.ComponentProps<typeof Tabs>) {
  const [config, setConfig] = useConfig()

  const installationType = React.useMemo(() => {
    return config.installationType || "cli"
  }, [config])

  return (
    <Tabs
      value={installationType}
      onValueChange={(value) =>
        setConfig({ ...config, installationType: value as "cli" | "manual" })
      }
      className="relative mt-6 w-full"
    >
      {children}
    </Tabs>
  )
}

Subdomains

Functions

Dependencies

  • react
  • tabs
  • use-config

Frequently Asked Questions

What does code-tabs.tsx do?
code-tabs.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, UIPrimitives subdomain.
What functions are defined in code-tabs.tsx?
code-tabs.tsx defines 1 function(s): CodeTabs.
What does code-tabs.tsx depend on?
code-tabs.tsx imports 3 module(s): react, tabs, use-config.
Where is code-tabs.tsx in the architecture?
code-tabs.tsx is located at deprecated/www/components/code-tabs.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: deprecated/www/components).

Analyze Your Own Codebase

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

Try Supermodel Free