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

# Typereferentie voor Element Sessions

> Gedeelde types voor de legacy ingebedde componenten van Whop, zoals Appearance en Theme.

## Overzicht

Deze pagina documenteert de gedeelde types die in alle ingebedde componenten van Whop worden gebruikt.

## EmbeddableElement

| Eigenschap | Type | Verplicht | Standaard | Beschrijving |
| - | - | - | - | - |
| `mount` | `(element: HTMLElement \| '#${string}') => void` | Ja | - | - |
| `unmount` | `() => void` | Ja | - | - |

## CSSValue

Een waarde van een CSS-eigenschap.

```typescript theme={null}

type CSSValue = string

```

## CSSProps

Een record van CSS-eigenschappen en hun waarden.

```typescript theme={null}

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

```

## Classes

Een record van CSS-klassenamen en hun stijldefinities.

```typescript theme={null}

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

```

Zie de [stylingreferentie](https://docs.whop.com/nl/sdk/elements/styling-reference.md) voor de volledige lijst met stabiele klassenamen die op ingebedde componenten worden toegepast.

## Variables

CSS custom properties (variabelen) die kunnen worden gebruikt om de stijlen van elementen aan te passen.
Sleutels moeten beginnen met het voorvoegsel `--`.

```typescript theme={null}

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

```

## AccentColor

Beschikbare accentkleuren voor het thematiseren van elementen.

Deze kleuren worden gebruikt voor primaire UI-elementen zoals knoppen, links en markeringen.

```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

Themaconfiguratie voor het aanpassen van het uiterlijk van elementen.

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

| Eigenschap | Type | Verplicht | Standaard | Beschrijving |
| - | - | - | - | - |
| `appearance` | `"light" \| "dark" \| undefined` | Nee | - | Het te gebruiken kleurenschema. - '"light"' - Lichte modus met donkere tekst op lichte achtergronden - '"dark"' - Donkere modus met lichte tekst op donkere achtergronden |
| `accentColor` | [`AccentColor`](#accentcolor) \| undefined | Nee | - | De primaire accentkleur voor interactieve elementen. |
| `grayColor` | `"gray" \| "mauve" \| "slate" \| "sage" \| "olive" \| "sand" \| "auto" \| undefined` | Nee | - | Het grijze kleurenpalet voor neutrale elementen. Gebruik '"auto"' om automatisch af te stemmen op de accentkleur. |
| `dangerColor` | `"ruby" \| "red" \| "tomato" \| undefined` | Nee | - | De kleur voor foutstatussen en destructieve acties. |
| `warningColor` | `"yellow" \| "amber" \| undefined` | Nee | - | De kleur voor waarschuwingsstatussen. |
| `successColor` | `"green" \| "teal" \| "jade" \| "grass" \| "lime" \| undefined` | Nee | - | De kleur voor successtatussen. |
| `infoColor` | `"blue" \| "sky" \| undefined` | Nee | - | De kleur voor informatieve statussen. |

## Appearance

Configuratie voor het aanpassen van het uiterlijk van Whop-elementen.

Gebruik dit om de ingebedde componenten af te stemmen op het ontwerp van je applicatie.

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

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

| Eigenschap | Type | Verplicht | Standaard | Beschrijving |
| - | - | - | - | - |
| `variables` | [`Variables`](#variables) \| null \| undefined | Nee | - | CSS custom properties om standaardstijlen te overschrijven. |
| `classes` | [`Classes`](#classes) \| null \| undefined | Nee | - | Aangepaste CSS-klassen om op elementen toe te passen. |
| `theme` | [`Theme`](#theme) \| null \| undefined | Nee | - | Thema-instellingen voor kleuren en weergavemodus. |

## WhopElementsEnvironment

De omgeving die voor API-aanroepen wordt gebruikt.

* `"production"` - Gebruik de live productie-API
* `"sandbox"` - Gebruik de sandbox-API om te testen

```typescript theme={null}

type WhopElementsEnvironment = "production" | "sandbox"

```

## WhopElementsOptions

Configuratieopties voor het initialiseren van WhopElements.

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

| Eigenschap | Type | Verplicht | Standaard | Beschrijving |
| - | - | - | - | - |
| `appearance` | [`Appearance`](#appearance) \| undefined | Nee | - | Pas het uiterlijk van de ingebedde Whop-Elements aan. Bevat thema-instellingen zoals lichte/donkere modus en accentkleuren. |
| `locale` | `"en" \| "es" \| "zh" \| "nl" \| "pt" \| "de" \| "hu" \| "it" \| "fr" \| "ja" \| "pl" \| "tr" \| undefined` | Nee | "en" | De locale voor alle Elements. Bepaalt de taal en de opmaak van tekst, datums en getallen. |
| `environment` | [`WhopElementsEnvironment`](#whopelementsenvironment) \| undefined | Nee | "production" | De omgeving voor API-aanroepen. Gebruik '"sandbox"' om te testen zonder productiegegevens te beïnvloeden. |


## Related topics

- [Element Sessions (Legacy)](https://docs.whop.com/nl/sdk/elements/overview.md)
- [Aan de slag met Element Sessions](https://docs.whop.com/nl/sdk/elements/whop-elements.md)
- [Quickstart voor chat](https://docs.whop.com/nl/developer/guides/chat/quickstart.md)
