Frosted UI
Frosted UI is Whop’s comprehensive React component library and design system. It provides 60+ accessible components, a sophisticated color system, typography scale, and seamless dark mode support—all built on top of Radix UI primitives and Tailwind CSS.
Installation
Set up the WhopApp provider
Wrap your application with the WhopApp component in your root layout. This sets up the theme and iframe SDK.
Typography
Frosted UI provides a comprehensive typography system with two main components: Heading and Text.
Type Scale
Both components use a 10-step size scale (0-9):
Text Component
Props:
size:"0"through"9"(default:"3")weight:"light"|"regular"|"medium"|"bold"align:"left"|"center"|"right"color: Any accent color or"gray"highContrast: Increases contrast for accessibilityas:"span"|"div"|"p"|"label"
Heading Component
Props:
size:"0"through"9"(default:"6")weight:"light"|"regular"|"medium"|"bold"align:"left"|"center"|"right"as:"h1"|"h2"|"h3"|"h4"|"h5"|"h6"color: Any accent color or"gray"highContrast: Increases contrast for accessibility
Other Typography Components
Colors
Frosted UI uses Radix color scales, providing 12-step color palettes with both solid and alpha variants.
Accent Colors
27 accent colors are available:
Regular Colors: tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, brown, orange
Bright Colors: sky, mint, lime, yellow, amber, lemon, magenta
Metallic Colors: gold, bronze
Gray Colors
6 gray scales with different color temperatures:
gray- Pure neutral graymauve- Slightly purple-tintedslate- Cool blue-tintedsage- Subtle green-tintedolive- Warm olive-tintedsand- Warm sandy-tintedauto- Automatically matches accent color
Semantic Colors
Pre-configured colors for common use cases:
- Danger:
red(default),tomato,ruby - Warning:
amber(default),yellow - Success:
green(default),teal,jade,grass - Info:
sky(default),blue
Using Colors
Tailwind Color Classes
With the Tailwind plugin, you can use Frosted UI colors directly:
Color Scale:
- Steps 1-3: Backgrounds and subtle fills
- Steps 4-6: Borders and separators
- Steps 7-9: Interactive elements
- Steps 10-12: Text and high contrast elements
Alpha Variants:
- Use
{color}-a1through{color}-a12for transparency
With the frostedUiPlugin() added to your tailwind config, the default
tailwind colors like bg-blue-200 DO NOT WORK. Use bg-blue-2 instead
according to the above documentation.
Dark Mode
Frosted UI includes automatic dark mode support that respects system preferences and user choices.
How It Works
Dark mode is managed through three appearance modes:
"inherit"(default) - Respects system preference"light"- Forces light mode"dark"- Forces dark mode
The theme preference is stored in a cookie (whop-frosted-theme) and falls back to system preference if not set.
Configuration
Set the appearance in your WhopApp component:
Or create nested themes with different appearances:
Tailwind Dark Mode Classes
Use the dark: prefix for dark mode styles:
Breakpoints
Frosted UI uses a mobile-first responsive system with 5 breakpoints.
Breakpoint Scale
Responsive Props
Many components support responsive values using an object syntax:
Tailwind Responsive Classes
Icons
Frosted UI includes an icon system through the @frosted-ui/icons package.
Using Icons
Common Icons
Frosted UI uses Radix Icons, which includes icons like:
- Navigation:
ChevronRightIcon,ChevronDownIcon,ArrowRightIcon - Actions:
Cross2Icon,CheckIcon,PlusIcon,MinusIcon - UI:
MagnifyingGlassIcon,GearIcon,PersonIcon - And many more…
Tailwind Plugin
The Frosted UI Tailwind plugin provides design tokens as Tailwind utilities.
What’s Included
Typography:
Colors:
Spacing & Layout:
Key Differences from Standard Tailwind
- Font Size Scale: Uses 0-9 instead of xs/sm/base/lg
- Line Height Scale: Matches font size scale (0-9)
- Color System: 12-step Radix color scales with alpha variants
- Semantic Colors: Built-in danger, warning, success, info colors
- Design Tokens: All values use CSS variables for theme consistency
Common Components
Button
Props:
size:"1"|"2"|"3"|"4"variant:"solid"|"soft"|"surface"|"ghost"|"classic"color: Any accent colorhighContrast: Enhanced contrastloading: Shows loading spinnerdisabled: Disables interaction
Input
Card
Badge
Dialog
Select
Checkbox & Radio
Advanced Usage
Theme Customization
Customize the theme with multiple options:
Nested Themes
Create sections with different themes:
Accessing Theme Context
Component Library
Frosted UI includes 60+ components organized by category:
Layout: Box, Flex, Grid, Container, Section, AspectRatio, Inset
Typography: Heading, Text, Code, Strong, Em, Kbd, Quote, Blockquote
Forms: TextInput, TextArea, Checkbox, RadioGroup, Select, Switch, Slider, DatePicker, OTPField
Buttons: Button, IconButton
Display: Card, Avatar, AvatarGroup, Badge, Callout, Table, DataList, Skeleton
Navigation: Tabs, Breadcrumbs, Link, SegmentedControl
Overlay: Dialog, AlertDialog, Drawer, Sheet, Popover, HoverCard, Tooltip, DropdownMenu, ContextMenu
Feedback: Progress, CircularProgress, Spinner
Utilities: ScrollArea, Separator, Portal, VisuallyHidden, AccessibleIcon
All components are built on Radix UI primitives and follow accessibility best practices.
Resources
- Radix UI Documentation - Component primitives
- Radix Colors - Color system documentation
- Tailwind CSS - Utility-first CSS framework

