Pricing

Lockness UI Component

VIEW

DOCUMENTATION

Pricing

Documentation for the Pricing component.

Installation

bash
deno run -A jsr:@lockness/ui add pricing

Usage

tsx
import {
  PricingSection,
  PricingCard,
  PricingCardHeader,
  PricingCardPrice,
  PricingCardFeatures,
  PricingCardFeature,
  PricingCardAction
} from '@lockness/ui/components'

<PricingSection columns={2}>
  <PricingCard>
    <PricingCardHeader title="Starter" />
    <PricingCardPrice price={0} description="Free forever" />
    <PricingCardFeatures>
      <PricingCardFeature>Up to 3 projects</PricingCardFeature>
      <PricingCardFeature>1 GB storage</PricingCardFeature>
    </PricingCardFeatures>
    <PricingCardAction href="/signup" variant="outline">
      Get Started Free
    </PricingCardAction>
  </PricingCard>

  <PricingCard featured>
    <PricingCardHeader title="Pro" badge="Popular" />
    <PricingCardPrice price={29} period="month" />
    <PricingCardFeatures>
      <PricingCardFeature>Unlimited projects</PricingCardFeature>
      <PricingCardFeature>50 GB storage</PricingCardFeature>
    </PricingCardFeatures>
    <PricingCardAction href="/signup">Start Free Trial</PricingCardAction>
  </PricingCard>
</PricingSection>

Props

PricingCard

PropTypeDefaultDescription
childrenunknown-Card content (PricingCardHeader, PricingCardPrice, etc.)
classstring-Additional CSS class names
featuredbooleanfalseWhether this tier is emphasized/featured

PricingCardHeader

PropTypeDefaultDescription
titlestringrequiredTier name displayed as the card title
badgestring-Optional badge text displayed above the title
badgeVariantBadgeProps['variant']'default'Visual variant for the badge
classstring-Additional CSS class names

PricingCardPrice

PropTypeDefaultDescription
pricenumber | stringrequiredPrice amount to display
currencyCurrencySymbol'$'Currency symbol displayed before the price
periodBillingPeriod-Billing period displayed after the price
originalPricenumber | string-Original price for showing discounts (with strikethrough)
descriptionstring-Additional description text below the price
classstring-Additional CSS class names

PricingCardDescription

PropTypeDefaultDescription
childrenunknown-Description text content
classstring-Additional CSS class names

PricingCardFeatures

PropTypeDefaultDescription
childrenunknown-Feature items (PricingCardFeature components)
classstring-Additional CSS class names

PricingCardFeature

PropTypeDefaultDescription
childrenunknown-Feature text content
includedbooleantrueWhether the feature is included (check icon if true, cross if false)
classstring-Additional CSS class names

PricingCardAction

PropTypeDefaultDescription
childrenunknown-Button text content
hrefstring-Button href (renders as link with up-follow if provided)
variantButtonProps['variant']'primary'Button visual variant
classstring-Additional CSS class names

PricingToggle

PropTypeDefaultDescription
selected'monthly' | 'yearly''monthly'Currently selected billing period
monthlyLabelstring'Monthly'Label for monthly option
yearlyLabelstring'Yearly'Label for yearly option
yearlyBadgestring-Optional badge text for yearly option (e.g., "Save 20%")
classstring-Additional CSS class names

TWO-TIER LAYOUT

Starter

$0

Free forever

Perfect for individuals and small projects

  • Up to 3 projects
  • 1 GB storage
  • Community support
  • Advanced analytics
  • Priority support
Popular

Pro

$29/month

For professionals and growing teams

  • Unlimited projects
  • 50 GB storage
  • Email support
  • Advanced analytics
  • Priority support
tsx
import {
  PricingSection,
  PricingCard,
  PricingCardHeader,
  PricingCardPrice,
  PricingCardDescription,
  PricingCardFeatures,
  PricingCardFeature,
  PricingCardAction,
} from '@lockness/ui/components'

<PricingSection columns={2}>
  <PricingCard>
    <PricingCardHeader title="Starter" />
    <PricingCardPrice price={0} description="Free forever" />
    <PricingCardDescription>
      Perfect for individuals and small projects
    </PricingCardDescription>
    <PricingCardFeatures>
      <PricingCardFeature>Up to 3 projects</PricingCardFeature>
      <PricingCardFeature included={false}>Priority support</PricingCardFeature>
    </PricingCardFeatures>
    <PricingCardAction href="/signup" variant="outline">
      Get Started Free
    </PricingCardAction>
  </PricingCard>
  
  <PricingCard featured>
    <PricingCardHeader title="Pro" badge="Popular" />
    <PricingCardPrice price={29} period="month" />
    <PricingCardAction href="/signup">Start Free Trial</PricingCardAction>
  </PricingCard>
</PricingSection>

THREE-TIER LAYOUT

Free

$0

No credit card required

Get started with the basics

  • 5 projects
  • 2 GB storage
  • Community forum
  • Custom domain
  • API access
Most Popular

Pro

$49/month

Everything you need to scale

  • Unlimited projects
  • 100 GB storage
  • Priority email support
  • Custom domain
  • API access
Custom

Enterprise

$Custom

Contact us for pricing

Advanced features for large teams

  • Everything in Pro
  • Unlimited storage
  • 24/7 phone support
  • Dedicated account manager
  • Custom integrations
tsx
<PricingSection columns={3}>
  <PricingCard>
    <PricingCardHeader title="Free" />
    <PricingCardPrice price={0} description="No credit card required" />
    <PricingCardFeatures>...</PricingCardFeatures>
    <PricingCardAction href="/signup" variant="outline">Sign Up</PricingCardAction>
  </PricingCard>
  
  <PricingCard featured>
    <PricingCardHeader title="Pro" badge="Most Popular" />
    <PricingCardPrice price={49} period="month" />
    <PricingCardFeatures>...</PricingCardFeatures>
    <PricingCardAction href="/signup">Start Free Trial</PricingCardAction>
  </PricingCard>
  
  <PricingCard>
    <PricingCardHeader title="Enterprise" badge="Custom" badgeVariant="secondary" />
    <PricingCardPrice price="Custom" description="Contact us for pricing" />
    <PricingCardFeatures>...</PricingCardFeatures>
    <PricingCardAction href="/contact" variant="outline">Contact Sales</PricingCardAction>
  </PricingCard>
</PricingSection>

MONTHLY/YEARLY TOGGLE

Pro Monthly

$29/month
  • Unlimited projects
  • 50 GB storage
Best Value

Pro Yearly

$278/year
$348

Save $70 per year

  • Everything in Monthly
  • 2 months free
tsx
import { PricingToggle } from '@lockness/ui/components'

<PricingToggle selected="yearly" yearlyBadge="Save 20%" />

<PricingSection columns={2}>
  <PricingCard>
    <PricingCardHeader title="Pro Monthly" />
    <PricingCardPrice price={29} period="month" />
    <PricingCardAction href="/signup">Subscribe</PricingCardAction>
  </PricingCard>
  
  <PricingCard featured>
    <PricingCardHeader title="Pro Yearly" badge="Best Value" />
    <PricingCardPrice 
      price={278} 
      period="year" 
      originalPrice={348}
      description="Save $70 per year"
    />
    <PricingCardAction href="/signup">Subscribe Yearly</PricingCardAction>
  </PricingCard>
</PricingSection>

FEATURE COMPARISON TABLE

FeaturesFreeProEnterprise
Projects550Unlimited
Storage2 GB100 GB1 TB
Team Members110Unlimited
API Access
Custom Domain
SupportCommunityEmail24/7 Phone
AnalyticsBasicAdvancedCustom
IntegrationsLimitedAllCustom
SSO
SLA99.9%99.99%
tsx
import { PricingComparison } from '@lockness/ui/components'

<PricingComparison
  tiers={['Free', 'Pro', 'Enterprise']}
  features={[
    ['Projects', '5', '50', 'Unlimited'],
    ['Storage', '2 GB', '100 GB', '1 TB'],
    ['API Access', false, true, true],
    ['Custom Domain', false, true, true],
    ['Support', 'Community', 'Email', '24/7 Phone'],
    ['SSO', false, false, true],
  ]}
/>