Overview
This page documents the shared types used across Whop embedded components.EmbeddableElement
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
mount | (element: HTMLElement | '#${string}') => void | Yes | - | - |
unmount | () => void | Yes | - | - |
CSSValue
A CSS property value.CSSProps
A record of CSS properties and their values.Classes
A record of CSS class names to their style definitions.Variables
CSS custom properties (variables) that can be used to customize element styles. Keys must start with-- prefix.
AccentColor
Available accent colors for theming elements. These colors are used for primary UI elements like buttons, links, and highlights.Theme
Theme configuration for customizing the visual appearance of elements.| Property | Type | Required | Default | Description |
|---|---|---|---|---|
appearance | "light" | "dark" | undefined | No | - | The color scheme to use. - ‘“light”’ - Light mode with dark text on light backgrounds - ‘“dark”’ - Dark mode with light text on dark backgrounds |
accentColor | AccentColor | undefined | No | - | The primary accent color used for interactive elements. |
grayColor | "gray" | "mauve" | "slate" | "sage" | "olive" | "sand" | "auto" | undefined | No | - | The gray color palette to use for neutral elements. Use ‘“auto”’ to automatically match the accent color. |
dangerColor | "ruby" | "red" | "tomato" | undefined | No | - | The color used for error states and destructive actions. |
warningColor | "yellow" | "amber" | undefined | No | - | The color used for warning states. |
successColor | "green" | "teal" | "jade" | "grass" | undefined | No | - | The color used for success states. |
infoColor | "blue" | "sky" | undefined | No | - | The color used for informational states. |
Appearance
Configuration for customizing the visual appearance of Whop elements. Use this to match the embedded components to your application’s design.WhopElementsEnvironment
The environment to use for API calls."production"- Use the live production API"sandbox"- Use the sandbox API for testing
WhopElementsOptions
Configuration options for initializing WhopElements.| Property | Type | Required | Default | Description |
|---|---|---|---|---|
appearance | Appearance | undefined | No | - | Customize the appearance of the Whop embedded Elements. Includes theme settings like light/dark mode and accent colors. |
locale | "en" | undefined | No | ”en” | The locale to use for all Elements. Controls the language and formatting of text, dates, and numbers. |
environment | WhopElementsEnvironment | undefined | No | ”production” | The environment to use for API calls. Use ‘“sandbox”’ for testing without affecting production data. |

