Installation
1
Install the package
The
@whop/react package includes Frosted UI and all necessary dependencies.2
Set up the WhopApp provider
Wrap your application with the
WhopApp component in your root layout. This sets up the theme and iframe SDK.3
Configure Next.js (optional)
Use the
withWhopAppConfig wrapper in your Next.js configuration:This configures server actions and optimizes Frosted UI imports.
4
Set up Tailwind (optional)
If you’re using Tailwind CSS, add the Frosted UI plugin to access design tokens:
Frosted UI is now set up and ready to use!
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):| Size | Font Size | Usage |
|---|---|---|
| 0 | 10px | Smallest text |
| 1 | 12px | Small labels |
| 2 | 14px | Body text (small) |
| 3 | 16px | Body text (default) |
| 4 | 18px | Emphasized text |
| 5 | 20px | Subheadings |
| 6 | 24px | Headings |
| 7 | 28px | Large headings |
| 8 | 32px | Display text |
| 9 | 40px | Hero text |
Text Component
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
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:- 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
- 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
whop-frosted-theme) and falls back to system preference if not set.
Configuration
Set the appearance in yourWhopApp component:
Tailwind Dark Mode Classes
Use thedark: prefix for dark mode styles:
Breakpoints
Frosted UI uses a mobile-first responsive system with 5 breakpoints.Breakpoint Scale
| Name | Min Width | Usage |
|---|---|---|
initial | 0px | Mobile (default) |
xs | 520px | Large mobile |
sm | 768px | Tablet |
md | 1024px | Small desktop |
lg | 1280px | Desktop |
xl | 1640px | Large desktop |
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: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
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

