MaxLengthSelector() — ui Function Reference
Architecture documentation for the MaxLengthSelector() function in maxlength-selector.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3f0adde3_14b3_eb5a_b3bb_04d5153287ac["MaxLengthSelector()"] 12e0ee77_0f04_b887_ce1d_8d7c2d6fd57c["maxlength-selector.tsx"] 3f0adde3_14b3_eb5a_b3bb_04d5153287ac -->|defined in| 12e0ee77_0f04_b887_ce1d_8d7c2d6fd57c style 3f0adde3_14b3_eb5a_b3bb_04d5153287ac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/app/(app)/examples/playground/components/maxlength-selector.tsx lines 18–55
export function MaxLengthSelector({ defaultValue }: MaxLengthSelectorProps) {
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="maxlength">Maximum Length</Label>
<span className="w-12 rounded-md border border-transparent px-2 py-0.5 text-right text-sm text-muted-foreground hover:border-border">
{value}
</span>
</div>
<Slider
id="maxlength"
max={4000}
defaultValue={value}
step={10}
onValueChange={setValue}
className="[&_[role=slider]]:h-4 [&_[role=slider]]:w-4"
aria-label="Maximum Length"
/>
</div>
</HoverCardTrigger>
<HoverCardContent
align="start"
className="w-[260px] text-sm"
side="left"
>
The maximum number of tokens to generate. Requests can use up to 2,048
or 4,000 tokens, shared between prompt and completion. The exact limit
varies by model.
</HoverCardContent>
</HoverCard>
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does MaxLengthSelector() do?
MaxLengthSelector() is a function in the ui codebase, defined in deprecated/www/app/(app)/examples/playground/components/maxlength-selector.tsx.
Where is MaxLengthSelector() defined?
MaxLengthSelector() is defined in deprecated/www/app/(app)/examples/playground/components/maxlength-selector.tsx at line 18.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free