SubscriptionPlanCard
DomainSubscription plan card displaying name, price with currency formatting, billing interval, and feature list with checkmarks. Highlights the popular and current plans. Accepts onSelect callback for plan switching.
Starter
For individuals getting started
$0
/ month
- 1 project
- Community support
- Basic analytics
Current Plan
Pro
For growing teams
$19
/ month
- Unlimited projects
- Priority email support
- Advanced analytics
- Custom integrations
Business
For organizations at scale
$49
/ month
- Everything in Pro
- SSO & SAML
- Dedicated success manager
- 99.9% uptime SLA
<%- include('modules/domain/common/subscription/SubscriptionPlanCard', {
plan: freePlan,
action: '/billing/subscribe'
}) %>
<%- include('modules/domain/common/subscription/SubscriptionPlanCard', {
plan: proPlan,
isCurrent: true
}) %>
<%- include('modules/domain/common/subscription/SubscriptionPlanCard', {
plan: enterprisePlan,
action: '/billing/subscribe'
}) %>
Current Plan
Pro
For growing teams
$19
/ month
- Unlimited projects
- Priority email support
- Advanced analytics
- Custom integrations
Popular
Pro
For growing teams
$19
/ month
- Unlimited projects
- Priority email support
- Advanced analytics
- Custom integrations
<%- include('modules/domain/common/subscription/SubscriptionPlanCard', {
plan: plan,
isCurrent: true
}) %>
<%- include('modules/domain/common/subscription/SubscriptionPlanCard', {
plan: Object.assign({}, plan, { isPopular: true }),
action: '/billing/subscribe'
}) %>
<%
var _plan = locals.plan || {};
var _isCurrent = !!locals.isCurrent;
var _isSelected = !!locals.isSelected;
var _loading = !!locals.loading;
var _action = locals.action || '';
var _className = locals.className || '';
var planId = _plan.planId || '';
var planName = _plan.name || '';
var description = _plan.description || '';
var price = typeof _plan.price === 'number' ? _plan.price : 0;
var currency = _plan.currency || 'USD';
var interval = _plan.interval || 'MONTHLY';
var features = _plan.features || [];
var isPopular = !!_plan.isPopular;
var INTERVAL_LABEL = {
MONTHLY: '/ month',
YEARLY: '/ year',
ONCE: 'one-time',
};
var intervalLabel = INTERVAL_LABEL[interval] || INTERVAL_LABEL.MONTHLY;
var formattedPrice;
try {
formattedPrice = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: currency,
minimumFractionDigits: (price % 100 === 0) ? 0 : 2,
}).format(price / 100);
} catch (e) {
formattedPrice = (price / 100).toFixed(2) + ' ' + currency;
}
var highlighted = isPopular || _isSelected || _isCurrent;
var cardClass = 'relative flex flex-col rounded-2xl border p-6 transition-shadow ' +
(highlighted
? 'border-primary shadow-md shadow-primary/10'
: 'border-border shadow-sm hover:shadow-md');
var btnDisabled = _isCurrent || _loading || !_action;
var btnText = _isCurrent ? 'Current Plan' : (_loading ? 'Processing…' : ('Choose ' + planName));
var btnClass = 'mt-auto w-full rounded-xl px-4 py-2.5 text-sm font-medium transition-colors ' +
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ' +
(_isCurrent
? 'bg-surface-raised text-text-secondary cursor-default'
: 'bg-primary text-primary-fg hover:bg-primary-hover active:bg-primary-active disabled:opacity-50 disabled:cursor-not-allowed');
%>
<% if (isPopular && !_isCurrent) { %>
Popular
<% } %>
<% if (_isCurrent) { %>
Current Plan
<% } %>
<%= planName %>
<% if (description) { %>
<%= description %>
<% } %>
<%= formattedPrice %>
<%= intervalLabel %>
<% if (features && features.length > 0) { %>
<% features.forEach(function(feature) { %>
-
<%= feature %>
<% }); %>
<% } %>
<% if (_action && !_isCurrent) { %>
<% } else { %>
<% } %>