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

# Typereference for Element Sessions

> Delte typer for de forældede indlejrede Whop-komponenter, såsom Appearance og Theme.

## Oversigt

Denne side dokumenterer de delte typer, der bruges på tværs af Whops indlejrede komponenter.

## EmbeddableElement

| Egenskab | Type | Påkrævet | Standard | Beskrivelse |
| - | - | - | - | - |
| `mount` | `(element: HTMLElement \| '#${string}') => void` | Ja | - | - |
| `unmount` | `() => void` | Ja | - | - |

## CSSValue

En værdi for en CSS-egenskab.

```typescript theme={null}

type CSSValue = string

```

## CSSProps

En record med CSS-egenskaber og deres værdier.

```typescript theme={null}

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

```

## Classes

En record, der knytter CSS-klassenavne til deres stildefinitioner.

```typescript theme={null}

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

```

Se [styling-referencen](https://docs.whop.com/da/sdk/elements/styling-reference.md) for den fulde liste over stabile klassenavne, der anvendes på indlejrede komponenter.

## Variables

CSS custom properties (variabler), der kan bruges til at tilpasse elementernes stilarter.
Nøgler skal starte med præfikset `--`.

```typescript theme={null}

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

```

## AccentColor

Tilgængelige accentfarver til temaer for elementer.

Disse farver bruges til primære UI-elementer som knapper, links og fremhævninger.

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

Temakonfiguration til at tilpasse elementernes visuelle udseende.

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

| Egenskab | Type | Påkrævet | Standard | Beskrivelse |
| - | - | - | - | - |
| `appearance` | `"light" \| "dark" \| undefined` | Nej | - | Det farveskema, der skal bruges. - '"light"' - Lys tilstand med mørk tekst på lys baggrund - '"dark"' - Mørk tilstand med lys tekst på mørk baggrund |
| `accentColor` | [`AccentColor`](#accentcolor) \| undefined | Nej | - | Den primære accentfarve, der bruges til interaktive elementer. |
| `grayColor` | `"gray" \| "mauve" \| "slate" \| "sage" \| "olive" \| "sand" \| "auto" \| undefined` | Nej | - | Den grå farvepalet, der skal bruges til neutrale elementer. Brug '"auto"' for automatisk at matche accentfarven. |
| `dangerColor` | `"ruby" \| "red" \| "tomato" \| undefined` | Nej | - | Farven, der bruges til fejltilstande og destruktive handlinger. |
| `warningColor` | `"yellow" \| "amber" \| undefined` | Nej | - | Farven, der bruges til advarselstilstande. |
| `successColor` | `"green" \| "teal" \| "jade" \| "grass" \| "lime" \| undefined` | Nej | - | Farven, der bruges til succestilstande. |
| `infoColor` | `"blue" \| "sky" \| undefined` | Nej | - | Farven, der bruges til informationstilstande. |

## Appearance

Konfiguration til at tilpasse Whop-elementernes visuelle udseende.

Brug dette til at matche de indlejrede komponenter med din applikations design.

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

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

| Egenskab | Type | Påkrævet | Standard | Beskrivelse |
| - | - | - | - | - |
| `variables` | [`Variables`](#variables) \| null \| undefined | Nej | - | CSS custom properties til at tilsidesætte standardstilarter. |
| `classes` | [`Classes`](#classes) \| null \| undefined | Nej | - | Brugerdefinerede CSS-klasser, der skal anvendes på elementer. |
| `theme` | [`Theme`](#theme) \| null \| undefined | Nej | - | Temaindstillinger for farver og udseendetilstand. |

## WhopElementsEnvironment

Det miljø, der skal bruges til API-kald.

* `"production"` - Brug det live produktions-API
* `"sandbox"` - Brug sandbox-API'et til test

```typescript theme={null}

type WhopElementsEnvironment = "production" | "sandbox"

```

## WhopElementsOptions

Konfigurationsindstillinger til initialisering af WhopElements.

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

| Egenskab | Type | Påkrævet | Standard | Beskrivelse |
| - | - | - | - | - |
| `appearance` | [`Appearance`](#appearance) \| undefined | Nej | - | Tilpas udseendet af Whops indlejrede Elements. Omfatter temaindstillinger som lys/mørk tilstand og accentfarver. |
| `locale` | `"en" \| "es" \| "zh" \| "nl" \| "pt" \| "de" \| "hu" \| "it" \| "fr" \| "ja" \| "pl" \| "tr" \| undefined` | Nej | "en" | Den locale, der skal bruges til alle Elements. Styrer sproget og formateringen af tekst, datoer og tal. |
| `environment` | [`WhopElementsEnvironment`](#whopelementsenvironment) \| undefined | Nej | "production" | Det miljø, der skal bruges til API-kald. Brug '"sandbox"' til test uden at påvirke produktionsdata. |


## Related topics

- [Element Sessions (forældet)](https://docs.whop.com/da/sdk/elements/overview.md)
- [Kom i gang med Element Sessions](https://docs.whop.com/da/sdk/elements/whop-elements.md)
- [Chat-element](https://docs.whop.com/da/developer/guides/chat/chat-element.md)
