Data display and layout
Pricing
A set of plan cards with price, feature list and a featured plan.
Example
<div class="pricing"><div class="pricing-card"><h3 class="pricing-name">Starter</h3><p class="pricing-desc">For side projects.</p><p class="pricing-price">$0<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>3 projects</li><li>Community support</li></ul><a class="inline-flex items-center rounded-lg border border-border px-4 py-2 text-sm font-medium justify-center" href="#">Start free</a></div><div class="pricing-card pricing-featured"><span class="pricing-badge">Most popular</span><h3 class="pricing-name">Pro</h3><p class="pricing-desc">For growing teams.</p><p class="pricing-price">$24<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>Unlimited projects</li><li>Priority support</li><li>Custom themes</li></ul><a class="inline-flex items-center rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground justify-center" href="#">Upgrade</a></div><div class="pricing-card"><h3 class="pricing-name">Enterprise</h3><p class="pricing-desc">For large organizations.</p><p class="pricing-price">$99<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>Single sign on</li><li>Audit log</li><li>Dedicated manager</li></ul><a class="inline-flex items-center rounded-lg border border-border px-4 py-2 text-sm font-medium justify-center" href="#">Contact sales</a></div></div>Classes
9 classes. Click a name to copy it. Utilities on the same element always win over component defaults, so any of them can be adjusted with plain utility classes.
| Class | Type | What it does |
|---|---|---|
| Base | Base class of the pricing. On a <div> in the example. Sets grid display, grid tracks, alignment and gap.CSS |
|
| Modifier | Modifier, combined with the pricing class. On a <div> in the example. Sets flex display, alignment, gap, padding, border and corner radius.CSS |
|
| Modifier | Modifier, combined with the pricing class. On a <div> in the example. Sets border and shadow.CSS |
|
| Part | Part of the pricing. On a <span> in the example. Sets absolute position, offsets, padding, corner radius, background and text color.CSS |
|
| Part | Part of the pricing. On a <h3> in the example. Sets font weight.CSS |
|
| Part | Part of the pricing. On a <p> in the example. Sets margin, text size and text color.CSS |
|
| Part | Part of the pricing. On a <p> in the example. Sets flex display, alignment, gap, text size, font weight and text style.CSS |
|
| Part | Part of the pricing. On a <span> in the example. Sets text size, font weight, text style and text color.CSS |
|
| Part | Part of the pricing. On an <ul> in the example. Sets flex display, alignment, gap, text size, generated content and width.CSS |
Usage
Components ship inside the same stylesheet as the utilities. There is nothing else to install and no script to load: link Monsoon and write the markup.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss">
<!-- Pricing: start from the base class, then add modifiers -->
<div class="pricing"><div class="pricing-card"><h3 class="pricing-name">Starter</h3><p class="pricing-desc">For side projects.</p><p class="pricing-price">$0<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>3 projects</li><li>Community support</li></ul><a class="inline-flex items-center rounded-lg border border-border px-4 py-2 text-sm font-medium justify-center" href="#">Start free</a></div><div class="pricing-card pricing-featured"><span class="pricing-badge">Most popular</span><h3 class="pricing-name">Pro</h3><p class="pricing-desc">For growing teams.</p><p class="pricing-price">$24<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>Unlimited projects</li><li>Priority support</li><li>Custom themes</li></ul><a class="inline-flex items-center rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground justify-center" href="#">Upgrade</a></div><div class="pricing-card"><h3 class="pricing-name">Enterprise</h3><p class="pricing-desc">For large organizations.</p><p class="pricing-price">$99<span class="pricing-period">/month</span></p><ul class="pricing-features"><li>Single sign on</li><li>Audit log</li><li>Dedicated manager</li></ul><a class="inline-flex items-center rounded-lg border border-border px-4 py-2 text-sm font-medium justify-center" href="#">Contact sales</a></div></div>Theme it with --seed on any ancestor, for example style="--seed: #0d9488", and force a scheme with class="dark" or class="light" on a wrapper.
Accessibility
- Every interactive part shows a visible focus ring with
:focus-visible, and tone colors pair with-foregroundtokens that keep text at 4.5:1 or better in light and dark mode.