Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import type { ComponentProps, ReactElement } from "react";
import { DialogContent } from "@/components/ui/dialog";
import { cn } from "@/lib/utils";
import { focusRecipeDialogOnOpen } from "./recipe-dialog-focus";
/** Firefox's .scroll-rounded clip would cut the edge shadow, so an inner viewport scrolls. */
export function RecipeDialogContent({
className,
viewportClassName,
children,
onOpenAutoFocus,
...props
}: ComponentProps<typeof DialogContent> & {
viewportClassName?: string;
}): ReactElement {
return (
<DialogContent
position="absolute"
overlayPosition="absolute"
overlayClassName="bg-transparent"
className={cn(
"corner-squircle flex max-h-[min(calc(650px*var(--ui-space-scale,1)),calc(100dvh-var(--studio-window-chrome-top,0px)-2rem))] flex-col overflow-hidden p-0 sm:max-w-2xl shadow-border",
className,
)}
onOpenAutoFocus={(event) => focusRecipeDialogOnOpen(event, onOpenAutoFocus)}
{...props}
>
<div
data-slot="recipe-dialog-viewport"
className={cn(
"grid min-h-0 gap-6 overflow-y-auto overflow-x-hidden scroll-rounded rounded-3xl px-7 pt-8 pb-7",
viewportClassName,
)}
>
{children}
</div>
</DialogContent>
);
}