temperature-selector.tsx — ui Source File
Architecture documentation for temperature-selector.tsx, a tsx file in the ui codebase. 5 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 27f75f6f_cc73_e7e5_511e_141d5c334dcc["temperature-selector.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 27f75f6f_cc73_e7e5_511e_141d5c334dcc --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"] 27f75f6f_cc73_e7e5_511e_141d5c334dcc --> 9c463da6_747b_38dc_586b_cbb4873070b1 951c1a95_84b7_603d_3cc1_d98bfa6cfc50["hover-card"] 27f75f6f_cc73_e7e5_511e_141d5c334dcc --> 951c1a95_84b7_603d_3cc1_d98bfa6cfc50 d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"] 27f75f6f_cc73_e7e5_511e_141d5c334dcc --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d a726b95d_789e_b9ec_d440_20ff0f30482e["slider"] 27f75f6f_cc73_e7e5_511e_141d5c334dcc --> a726b95d_789e_b9ec_d440_20ff0f30482e 5ee45142_aa10_ca73_456e_5946db3e53c3["page.tsx"] 5ee45142_aa10_ca73_456e_5946db3e53c3 --> 27f75f6f_cc73_e7e5_511e_141d5c334dcc style 27f75f6f_cc73_e7e5_511e_141d5c334dcc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import type { Slider as SliderPrimitive } from "radix-ui"
import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
} from "@/registry/new-york-v4/ui/hover-card"
import { Label } from "@/registry/new-york-v4/ui/label"
import { Slider } from "@/registry/new-york-v4/ui/slider"
interface TemperatureSelectorProps {
defaultValue: React.ComponentProps<
typeof SliderPrimitive.Root
>["defaultValue"]
}
export function TemperatureSelector({
defaultValue,
}: TemperatureSelectorProps) {
const [value, setValue] = React.useState(defaultValue)
return (
<div className="grid gap-2 pt-2">
<HoverCard openDelay={200}>
<HoverCardTrigger asChild>
<div className="grid gap-4">
<div className="flex items-center justify-between">
<Label htmlFor="temperature">Temperature</Label>
<span className="text-muted-foreground hover:border-border w-12 rounded-md border border-transparent px-2 py-0.5 text-right text-sm">
{value}
</span>
</div>
<Slider
id="temperature"
max={1}
defaultValue={value}
step={0.1}
onValueChange={setValue}
aria-label="Temperature"
/>
</div>
</HoverCardTrigger>
<HoverCardContent
align="start"
className="w-[260px] text-sm"
side="left"
>
Controls randomness: lowering results in less random completions. As
the temperature approaches zero, the model will become deterministic
and repetitive.
</HoverCardContent>
</HoverCard>
</div>
)
}
Domain
Subdomains
Functions
Types
Dependencies
- hover-card
- label
- radix-ui
- react
- slider
Imported By
Source
Frequently Asked Questions
What does temperature-selector.tsx do?
temperature-selector.tsx is a source file in the ui codebase, written in tsx. It belongs to the ApplicationExhibition domain, PlaygroundAI subdomain.
What functions are defined in temperature-selector.tsx?
temperature-selector.tsx defines 1 function(s): TemperatureSelector.
What does temperature-selector.tsx depend on?
temperature-selector.tsx imports 5 module(s): hover-card, label, radix-ui, react, slider.
What files import temperature-selector.tsx?
temperature-selector.tsx is imported by 1 file(s): page.tsx.
Where is temperature-selector.tsx in the architecture?
temperature-selector.tsx is located at apps/v4/app/(app)/examples/playground/components/temperature-selector.tsx (domain: ApplicationExhibition, subdomain: PlaygroundAI, directory: apps/v4/app/(app)/examples/playground/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free