> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Frosted UI

> Uygulamanızın arayüzünü oluşturmak için Whop'un React bileşen kütüphanesi ve tasarım sistemi olan Frosted UI'ı kurun ve kullanın.

Frosted UI, Whop'un kapsamlı React bileşen kütüphanesi ve tasarım sistemidir. Erişilebilirlik standartlarını karşılayan 60'tan fazla bileşen sunar. Ayrıca gelişmiş bir renk sistemi, tipografi ölçeği ve sorunsuz karanlık mod desteği içerir; bunların tümü Radix UI temel yapı taşları ve Tailwind CSS üzerine kuruludur.

## Kurulum

**1. Paketi yükleyin**

```bash pnpm theme={null}
pnpm add @whop/react
```

```bash npm theme={null}
npm install @whop/react
```

```bash yarn theme={null}
yarn add @whop/react
```

```bash bun theme={null}
bun install @whop/react
```

> [!NOTE]
>
> `@whop/react` paketi Frosted UI'ı ve gerekli tüm bağımlılıkları içerir.

**2. WhopApp sağlayıcısını kurun**

Kök düzeninizde uygulamanızı `WhopApp` bileşeniyle sarmalayın. Bu, temayı ve iframe SDK'sını kurar.

```tsx theme={null}
// app/layout.tsx
import { WhopApp } from "@whop/react";

export default function RootLayout({
    children,
}: {
    children: React.ReactNode;
}) {
    return (
        <html lang="en">
            <body>
                <WhopApp accentColor="blue" appearance="inherit">
                    {children}
                </WhopApp>
            </body>
        </html>
    );
}
```

**3. Next.js'i yapılandırın (isteğe bağlı)**

Next.js yapılandırmanızda `withWhopAppConfig` sarmalayıcısını kullanın:

```typescript theme={null}
// next.config.ts
import type { NextConfig } from "next";
import { withWhopAppConfig } from "@whop/react/next.config";

const nextConfig: NextConfig = {
    // your config options
};

export default withWhopAppConfig(nextConfig);
```

> [!NOTE]
>
> Bu, sunucu eylemlerini yapılandırır ve Frosted UI içe aktarmalarını optimize eder.

**4. Tailwind'i kurun (isteğe bağlı)**

Tailwind CSS kullanıyorsanız, tasarım token'larına erişmek için Frosted UI eklentisini ekleyin:

```javascript theme={null}
// tailwind.config.js
import { frostedThemePlugin } from "@whop/react/tailwind";

export default {
    content: ["./src/**/*.{js,ts,jsx,tsx}"],
    plugins: [frostedThemePlugin()],
};
```

> [!TIP]
>
> Frosted UI artık kuruldu ve kullanıma hazır.

***

## Tipografi

Frosted UI, iki ana bileşene sahip kapsamlı bir tipografi sistemi sunar: `Heading` ve `Text`.

### Yazı ölçeği

Her iki bileşen de 10 adımlı bir boyut ölçeği (0-9) kullanır:

| Boyut | Yazı boyutu | Kullanım |
| - | - | - |
| 0 | 10px | En küçük metin |
| 1 | 12px | Küçük etiketler |
| 2 | 14px | Gövde metni (küçük) |
| 3 | 16px | Gövde metni (varsayılan) |
| 4 | 18px | Vurgulanmış metin |
| 5 | 20px | Alt başlıklar |
| 6 | 24px | Başlıklar |
| 7 | 28px | Büyük başlıklar |
| 8 | 32px | Gösterim metni |
| 9 | 40px | Hero metni |

### Text bileşeni

```tsx theme={null}
import { Text } from "@whop/react";

<Text size="3" weight="medium">
    This is body text
</Text>

<Text size="1" color="gray">
    Small muted text
</Text>

<Text as="label" size="2" weight="bold">
    Form Label
</Text>
```

**Prop'lar:**

* `size`: `"0"` ile `"9"` arası (varsayılan: `"3"`)
* `weight`: `"light"` | `"regular"` | `"medium"` | `"bold"`
* `align`: `"left"` | `"center"` | `"right"`
* `color`: Herhangi bir vurgu rengi veya `"gray"`
* `highContrast`: Erişilebilirlik için kontrastı artırır
* `as`: `"span"` | `"div"` | `"p"` | `"label"`

### Heading bileşeni

```tsx theme={null}
import { Heading } from "@whop/react";

<Heading size="6" as="h1">
    Page Title
</Heading>

<Heading size="4" as="h2" weight="medium">
    Section Heading
</Heading>
```

**Prop'lar:**

* `size`: `"0"` ile `"9"` arası (varsayılan: `"6"`)
* `weight`: `"light"` | `"regular"` | `"medium"` | `"bold"`
* `align`: `"left"` | `"center"` | `"right"`
* `as`: `"h1"` | `"h2"` | `"h3"` | `"h4"` | `"h5"` | `"h6"`
* `color`: Herhangi bir vurgu rengi veya `"gray"`
* `highContrast`: Erişilebilirlik için kontrastı artırır

### Diğer tipografi bileşenleri

```tsx theme={null}
import { Code, Strong, Em, Kbd } from "@whop/react";

<Code>const example = "code";</Code>
<Strong>Bold text</Strong>
<Em>Italic text</Em>
<Kbd>⌘ K</Kbd>
```

***

## Renkler

Frosted UI, hem düz hem de alfa varyantlarına sahip 12 adımlı renk paletleri sunan Radix renk ölçeklerini kullanır.

### Vurgu renkleri

27 vurgu rengi mevcuttur:

**Normal renkler:** `tomato`, `red`, `ruby`, `crimson`, `pink`, `plum`, `purple`, `violet`, `iris`, `indigo`, `blue`, `cyan`, `teal`, `jade`, `green`, `grass`, `brown`, `orange`

**Parlak renkler:** `sky`, `mint`, `lime`, `yellow`, `amber`, `lemon`, `magenta`

**Metalik renkler:** `gold`, `bronze`

### Gri renkler

Farklı renk sıcaklıklarına sahip 6 gri ölçeği:

* `gray` - Saf nötr gri
* `mauve` - Hafif mor tonlu
* `slate` - Soğuk mavi tonlu
* `sage` - Hafif yeşil tonlu
* `olive` - Sıcak zeytin tonlu
* `sand` - Sıcak kum tonlu
* `auto` - Vurgu rengiyle otomatik olarak eşleşir

### Anlamsal renkler

Yaygın kullanım durumları için önceden yapılandırılmış renkler:

* **Tehlike:** `red` (varsayılan), `tomato`, `ruby`
* **Uyarı:** `amber` (varsayılan), `yellow`
* **Başarı:** `green` (varsayılan), `teal`, `jade`, `grass`
* **Bilgi:** `sky` (varsayılan), `blue`

### Renkleri kullanma

```tsx theme={null}
import { Button, Badge, Text } from "@whop/react";

<Button color="blue">Primary Action</Button>
<Button color="red">Delete</Button>
<Badge color="green">Active</Badge>
<Text color="gray">Muted text</Text>
```

### Tailwind renk sınıfları

Tailwind eklentisiyle Frosted UI renklerini doğrudan kullanabilirsiniz:

```tsx theme={null}
<div className="bg-blue-2 text-blue-11 border border-blue-6">
    Blue themed box
</div>

<div className="bg-red-a3 text-red-11">
    Red with alpha background
</div>
```

**Renk ölçeği:**

* 1-3. adımlar: Arka planlar ve hafif dolgular
* 4-6. adımlar: Kenarlıklar ve ayırıcılar
* 7-9. adımlar: Etkileşimli öğeler
* 10-12. adımlar: Metin ve yüksek kontrastlı öğeler

**Alfa varyantları:**

* Saydamlık için `{color}-a1` ile `{color}-a12` arasını kullanın

> [!WARNING]
>
> Tailwind yapılandırmanıza `frostedUiPlugin()` eklendiğinde, `bg-blue-200` gibi
> varsayılan Tailwind renkleri çalışmaz. Bunun yerine yukarıdaki belgelere
> uygun olarak `bg-blue-2` kullanın.

***

## Karanlık mod

Frosted UI, sistem tercihlerine ve kullanıcı seçimlerine uyan otomatik karanlık mod desteği içerir.

### Nasıl çalışır

Karanlık modu üç görünüm modu üzerinden yönetin:

* `"inherit"` (varsayılan) - Sistem tercihine uyar
* `"light"` - Açık modu zorlar
* `"dark"` - Karanlık modu zorlar

Tarayıcı tema tercihini bir çerezde (`whop-frosted-theme`) saklar ve çerez yoksa sistem tercihine geri döner.

### Yapılandırma

Görünümü `WhopApp` bileşeninizde yapılandırın:

```tsx theme={null}
<WhopApp appearance="dark">{children}</WhopApp>
```

Ya da farklı görünümlere sahip iç içe temalar oluşturun:

```tsx theme={null}
import { Theme } from "@whop/react";

<Theme appearance="light">
    <div>This section is always light</div>
</Theme>

<Theme appearance="dark">
    <div>This section is always dark</div>
</Theme>
```

### Tailwind karanlık mod sınıfları

Karanlık mod stilleri için `dark:` önekini kullanın:

```tsx theme={null}
<div className="bg-white dark:bg-black text-black dark:text-white">
	Adapts to theme
</div>
```

***

## Kesme noktaları

Frosted UI, 5 kesme noktasına sahip mobil öncelikli duyarlı bir sistem kullanır.

### Kesme noktası ölçeği

| Ad | Min. genişlik | Kullanım |
| - | - | - |
| `initial` | 0px | Mobil (varsayılan) |
| `xs` | 520px | Büyük mobil |
| `sm` | 768px | Tablet |
| `md` | 1024px | Küçük masaüstü |
| `lg` | 1280px | Masaüstü |
| `xl` | 1640px | Büyük masaüstü |

### Duyarlı prop'lar

Birçok bileşen, nesne sözdizimi kullanarak duyarlı değerleri destekler:

```tsx theme={null}
import { Text, Box } from "@whop/react";

<Text size={{ initial: "2", md: "4", lg: "6" }}>Responsive text size</Text>;
```

### Tailwind duyarlı sınıfları

```tsx theme={null}
<div className="p-2 md:p-4 lg:p-8">
    Responsive padding
</div>

<div className="text-2 sm:text-3 md:text-4">
    Responsive text
</div>
```

***

## Simgeler

Frosted UI, `@frosted-ui/icons` paketi aracılığıyla bir simge sistemi içerir.

### Simgeleri kullanma

```tsx theme={null}
import { IconButton } from "@whop/react";
import { MagnifyingGlassIcon, Cross2Icon } from "@frosted-ui/icons";

<IconButton>
    <MagnifyingGlassIcon />
</IconButton>

<IconButton color="red">
    <Cross2Icon />
</IconButton>
```

### Yaygın simgeler

Frosted UI, aşağıdaki gibi simgeleri içeren Radix Icons'ı kullanır:

* Gezinme: `ChevronRightIcon`, `ChevronDownIcon`, `ArrowRightIcon`
* Eylemler: `Cross2Icon`, `CheckIcon`, `PlusIcon`, `MinusIcon`
* Arayüz: `MagnifyingGlassIcon`, `GearIcon`, `PersonIcon`
* Kütüphanede daha fazla simge mevcuttur.

***

## Tailwind eklentisi

Frosted UI Tailwind eklentisi, tasarım token'larını Tailwind yardımcı sınıfları olarak sunar.

### Neler dahil

**Tipografi:**

```tsx theme={null}
<p className="text-3 leading-3 font-medium tracking-2">
	Styled with Frosted UI tokens
</p>
```

**Renkler:**

```tsx theme={null}
<div className="bg-blue-2 text-blue-11 border-blue-6">Blue themed</div>
```

**Boşluk ve düzen:**

```tsx theme={null}
<div className="p-4 md:p-6 lg:p-8">Responsive padding</div>
```

### Standart Tailwind'den temel farklar

1. **Yazı boyutu ölçeği:** xs/sm/base/lg yerine 0-9 kullanır
2. **Satır yüksekliği ölçeği:** Yazı boyutu ölçeğiyle (0-9) eşleşir
3. **Renk sistemi:** Alfa varyantlarına sahip 12 adımlı Radix renk ölçekleri
4. **Anlamsal renkler:** Yerleşik tehlike, uyarı, başarı ve bilgi renkleri
5. **Tasarım token'ları:** Tema tutarlılığı için tüm değerler CSS değişkenleri kullanır

***

## Yaygın bileşenler

### Button

```tsx theme={null}
import { Button } from "@whop/react";

<Button size="2" variant="solid" color="blue">
    Primary Action
</Button>

<Button size="2" variant="soft" color="gray">
    Secondary
</Button>

<Button size="2" variant="ghost" color="red">
    Danger
</Button>
```

**Prop'lar:**

* `size`: `"1"` | `"2"` | `"3"` | `"4"`
* `variant`: `"solid"` | `"soft"` | `"surface"` | `"ghost"` | `"classic"`
* `color`: Herhangi bir vurgu rengi
* `highContrast`: Gelişmiş kontrast
* `loading`: Yükleme göstergesini gösterir
* `disabled`: Etkileşimi devre dışı bırakır

### Input

```tsx theme={null}
import { TextInput, TextArea } from "@whop/react";

<TextInput
    size="2"
    placeholder="Enter text..."
    variant="surface"
/>

<TextArea
    size="2"
    placeholder="Enter multiple lines..."
    rows={4}
/>
```

### Card

```tsx theme={null}
import { Card } from "@whop/react";

<Card size="2" variant="surface">
	<Heading size="4">Card Title</Heading>
	<Text>Card content goes here</Text>
</Card>;
```

### Badge

```tsx theme={null}
import { Badge } from "@whop/react";

<Badge color="green" variant="soft">Active</Badge>
<Badge color="red" variant="solid">Error</Badge>
<Badge color="gray" variant="surface">Draft</Badge>
```

### Dialog

```tsx theme={null}
import { Dialog, Button } from "@whop/react";

<Dialog.Root>
	<Dialog.Trigger>
		<Button>Open Dialog</Button>
	</Dialog.Trigger>
	<Dialog.Content>
		<Dialog.Title>Dialog Title</Dialog.Title>
		<Dialog.Description>This is the dialog content</Dialog.Description>
		<Dialog.Close>
			<Button>Close</Button>
		</Dialog.Close>
	</Dialog.Content>
</Dialog.Root>;
```

### Select

```tsx theme={null}
import { Select } from "@whop/react";

<Select.Root defaultValue="1">
	<Select.Trigger />
	<Select.Content>
		<Select.Item value="1">Option 1</Select.Item>
		<Select.Item value="2">Option 2</Select.Item>
		<Select.Item value="3">Option 3</Select.Item>
	</Select.Content>
</Select.Root>;
```

### Checkbox ve radio

```tsx theme={null}
import { Checkbox, RadioGroup } from "@whop/react";

<Checkbox size="2" color="blue">
    Accept terms
</Checkbox>

<RadioGroup.Root defaultValue="1">
    <RadioGroup.Item value="1">Option 1</RadioGroup.Item>
    <RadioGroup.Item value="2">Option 2</RadioGroup.Item>
</RadioGroup.Root>
```

***

## Gelişmiş kullanım

### Tema özelleştirme

Temayı birden fazla seçenekle özelleştirin:

```tsx theme={null}
<WhopApp
	appearance="dark"
	accentColor="violet"
	grayColor="mauve"
	dangerColor="ruby"
	warningColor="amber"
	successColor="jade"
	infoColor="sky"
>
	{children}
</WhopApp>
```

### İç içe temalar

Farklı temalara sahip bölümler oluşturun:

```tsx theme={null}
import { Theme } from "@whop/react";

<div>
	<Theme accentColor="blue">
		<Button>Blue button</Button>
	</Theme>

	<Theme accentColor="red" appearance="dark">
		<Button>Red button in dark mode</Button>
	</Theme>
</div>;
```

### Tema bağlamına erişme

```tsx theme={null}
import { useThemeContext } from "@whop/react";

function ThemedComponent() {
	const theme = useThemeContext();

	console.log(theme.appearance); // "light" | "dark"
	console.log(theme.accentColor); // "blue" | "red" | ...

	return <div>Current theme: {theme.appearance}</div>;
}
```

***

## Bileşen kütüphanesi

Frosted UI, kategorilere göre düzenlenmiş 60'tan fazla bileşen içerir:

**Düzen:** `Box`, `Flex`, `Grid`, `Container`, `Section`, `AspectRatio`, `Inset`

**Tipografi:** `Heading`, `Text`, `Code`, `Strong`, `Em`, `Kbd`, `Quote`, `Blockquote`

**Formlar:** `TextInput`, `TextArea`, `Checkbox`, `RadioGroup`, `Select`, `Switch`, `Slider`, `DatePicker`, `OTPField`

**Düğmeler:** `Button`, `IconButton`

**Görüntüleme:** `Card`, `Avatar`, `AvatarGroup`, `Badge`, `Callout`, `Table`, `DataList`, `Skeleton`

**Gezinme:** `Tabs`, `Breadcrumbs`, `Link`, `SegmentedControl`

**Katman:** `Dialog`, `AlertDialog`, `Drawer`, `Sheet`, `Popover`, `HoverCard`, `Tooltip`, `DropdownMenu`, `ContextMenu`

**Geri bildirim:** `Progress`, `CircularProgress`, `Spinner`

**Yardımcılar:** `ScrollArea`, `Separator`, `Portal`, `VisuallyHidden`, `AccessibleIcon`

> [!NOTE]
>
> Tüm bileşenler Radix UI temel yapı taşları üzerine kuruludur ve erişilebilirlik
> en iyi uygulamalarını izler.

***

## Kaynaklar

* [Radix UI belgeleri](https://www.radix-ui.com/) - Bileşen temel yapı taşları
* [Radix Colors](https://www.radix-ui.com/colors) - Renk sistemi belgeleri
* [Tailwind CSS](https://tailwindcss.com/) - Yardımcı sınıf öncelikli CSS çatısı


## Related topics

- [Platform Haritası](https://docs.whop.com/tr/developer/platform-map.md)
- [React Native ile Whop uygulamaları oluşturun](https://docs.whop.com/tr/developer/guides/react-native.md)
- [SearchElement (Eski)](https://docs.whop.com/tr/sdk/elements/search-element.md)
