> ## 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.

# Element Sessions 타입 레퍼런스

> Appearance, Theme 등 레거시 Whop 임베디드 컴포넌트에서 공유되는 타입입니다.

## 개요

이 페이지에서는 Whop 임베디드 컴포넌트 전반에서 사용되는 공유 타입을 설명합니다.

## EmbeddableElement

| 속성 | 타입 | 필수 | 기본값 | 설명 |
| - | - | - | - | - |
| `mount` | `(element: HTMLElement \| '#${string}') => void` | 예 | - | - |
| `unmount` | `() => void` | 예 | - | - |

## CSSValue

CSS 속성 값입니다.

```typescript theme={null}

type CSSValue = string

```

## CSSProps

CSS 속성과 그 값으로 이루어진 레코드입니다.

```typescript theme={null}

type CSSProps = { [x: string]: string; }

```

## Classes

CSS 클래스 이름과 해당 스타일 정의로 이루어진 레코드입니다.

```typescript theme={null}

type Classes = { [x: string]: CSSProps; }

```

임베디드 컴포넌트에 적용되는 안정적인 클래스 이름의 전체 목록은 [스타일링 레퍼런스](https://docs.whop.com/ko/sdk/elements/styling-reference.md)를 참조하세요.

## Variables

요소 스타일을 사용자 지정하는 데 사용할 수 있는 CSS 사용자 지정 속성(변수)입니다.
키는 `--` 접두사로 시작해야 합니다.

```typescript theme={null}

type Variables = { [x: `--${string}`]: string; }

```

## AccentColor

요소 테마 설정에 사용할 수 있는 강조 색상입니다.

이 색상은 버튼, 링크, 하이라이트 등 주요 UI 요소에 사용됩니다.

```typescript theme={null}

type AccentColor = "ruby" | "blue" | "red" | "yellow" | "green" | "gray" | "tomato" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "cyan" | "teal" | "jade" | "grass" | "brown" | "orange" | "indigo" | "sky" | "mint" | "amber" | "lime" | "lemon" | "magenta" | "gold" | "bronze"

```

## Theme

요소의 시각적 모양을 사용자 지정하기 위한 테마 구성입니다.

```typescript theme={null}
const theme: Theme = {
  appearance: "dark",
  accentColor: "blue",
  grayColor: "slate",
};
```

| 속성 | 타입 | 필수 | 기본값 | 설명 |
| - | - | - | - | - |
| `appearance` | `"light" \| "dark" \| undefined` | 아니요 | - | 사용할 색 구성표입니다. - '"light"' - 밝은 배경에 어두운 텍스트를 사용하는 라이트 모드 - '"dark"' - 어두운 배경에 밝은 텍스트를 사용하는 다크 모드 |
| `accentColor` | [`AccentColor`](#accentcolor) \| undefined | 아니요 | - | 상호작용 요소에 사용되는 기본 강조 색상입니다. |
| `grayColor` | `"gray" \| "mauve" \| "slate" \| "sage" \| "olive" \| "sand" \| "auto" \| undefined` | 아니요 | - | 중립 요소에 사용할 회색 팔레트입니다. 강조 색상에 자동으로 맞추려면 '"auto"'를 사용하세요. |
| `dangerColor` | `"ruby" \| "red" \| "tomato" \| undefined` | 아니요 | - | 오류 상태와 파괴적 작업에 사용되는 색상입니다. |
| `warningColor` | `"yellow" \| "amber" \| undefined` | 아니요 | - | 경고 상태에 사용되는 색상입니다. |
| `successColor` | `"green" \| "teal" \| "jade" \| "grass" \| "lime" \| undefined` | 아니요 | - | 성공 상태에 사용되는 색상입니다. |
| `infoColor` | `"blue" \| "sky" \| undefined` | 아니요 | - | 정보 상태에 사용되는 색상입니다. |

## Appearance

Whop 요소의 시각적 모양을 사용자 지정하기 위한 구성입니다.

임베디드 컴포넌트를 애플리케이션 디자인에 맞추는 데 사용하세요.

```typescript theme={null}
const appearance: Appearance = {
  theme: {
    appearance: "dark",
    accentColor: "blue",
  },
};

const whopElements = new WhopElements({ appearance });
```

| 속성 | 타입 | 필수 | 기본값 | 설명 |
| - | - | - | - | - |
| `variables` | [`Variables`](#variables) \| null \| undefined | 아니요 | - | 기본 스타일을 재정의하는 CSS 사용자 지정 속성입니다. |
| `classes` | [`Classes`](#classes) \| null \| undefined | 아니요 | - | 요소에 적용할 사용자 지정 CSS 클래스입니다. |
| `theme` | [`Theme`](#theme) \| null \| undefined | 아니요 | - | 색상과 모양 모드에 대한 테마 설정입니다. |

## WhopElementsEnvironment

API 호출에 사용할 환경입니다.

* `"production"` - 실제 프로덕션 API 사용
* `"sandbox"` - 테스트용 샌드박스 API 사용

```typescript theme={null}

type WhopElementsEnvironment = "production" | "sandbox"

```

## WhopElementsOptions

WhopElements를 초기화하기 위한 구성 옵션입니다.

```typescript theme={null}
const whopElements = new WhopElements({
  appearance: {
    theme: { appearance: "light" },
  },
  locale: "en",
  environment: "production",
});
```

| 속성 | 타입 | 필수 | 기본값 | 설명 |
| - | - | - | - | - |
| `appearance` | [`Appearance`](#appearance) \| undefined | 아니요 | - | Whop 임베디드 Elements의 모양을 사용자 지정합니다. 라이트/다크 모드, 강조 색상 등의 테마 설정이 포함됩니다. |
| `locale` | `"en" \| "es" \| "zh" \| "nl" \| "pt" \| "de" \| "hu" \| "it" \| "fr" \| "ja" \| "pl" \| "tr" \| undefined` | 아니요 | "en" | 모든 Elements에 사용할 로캘입니다. 텍스트, 날짜, 숫자의 언어와 형식을 제어합니다. |
| `environment` | [`WhopElementsEnvironment`](#whopelementsenvironment) \| undefined | 아니요 | "production" | API 호출에 사용할 환경입니다. 프로덕션 데이터에 영향을 주지 않고 테스트하려면 '"sandbox"'를 사용하세요. |


## Related topics

- [iOS Checkout SDK 레퍼런스](https://docs.whop.com/ko/developer/guides/ios/checkout-reference.md)
- [스타일링 레퍼런스](https://docs.whop.com/ko/sdk/elements/styling-reference.md)
- [Element 세션(레거시)](https://docs.whop.com/ko/sdk/elements/overview.md)
