@molecule/app-subscription-plan-card-solid

Feature · subscription-plan-card · App (browser) · v1.1.3 · Apache-2.0

Pricing / plan card with features, price + interval, primary CTA, recommended badge

npm install @molecule/app-subscription-plan-card-solid

npm · Source on GitHub

How it works

@molecule/app-subscription-plan-card-solid is a ready-made subscription-plan-card feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { SubscriptionPlanCard } from '@molecule/app-subscription-plan-card-solid'

declare function navigate(to: string): void

export function Plans() {
  return (
    <SubscriptionPlanCard
      name="Pro"
      price="$19"
      interval="/month"
      features={['Unlimited projects', '10 GB storage', 'Priority support']}
      ctaLabel="Get started"
      onCta={() => navigate('/checkout/pro')}
      recommended
      badge="Most popular"
    />
  )
}

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid pricing / subscription plan card.

Exports SubscriptionPlanCard — the Solid counterpart of @molecule/app-subscription-plan-card-react: the same props (React names), the same ClassMap tokens, and the same DOM for the same input. It renders the header (badge + name + description), price + interval, feature checklist, and a primary CTA (button or link).

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { SubscriptionPlanCard } from '@molecule/app-subscription-plan-card-solid'

declare function navigate(to: string): void

export function Plans() {
  return (
    <SubscriptionPlanCard
      name="Pro"
      price="$19"
      interval="/month"
      features={['Unlimited projects', '10 GB storage', 'Priority support']}
      ctaLabel="Get started"
      onCta={() => navigate('/checkout/pro')}
      recommended
      badge="Most popular"
    />
  )
}

Type

feature

Installation

npm install @molecule/app-subscription-plan-card-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

SubscriptionPlanCardProps

Props accepted by the SubscriptionPlanCard component.

interface SubscriptionPlanCardProps {
  /** Plan name (e.g. "Pro", "Team", "Enterprise"). */
  name: JSX.Element
  /** Optional tagline / one-liner. */
  description?: JSX.Element
  /** Price string ("$19", "Free", "Custom") — apps own currency formatting. */
  price: JSX.Element
  /** Billing interval label ("/month", "/yr", "per seat"). */
  interval?: JSX.Element
  /** Bullet feature list. */
  features: JSX.Element[]
  /** Primary CTA button label. */
  ctaLabel?: JSX.Element
  /** Click / nav handler (receives the click event, as React's CTA does). */
  onCta?: (event?: KitMouseEvent) => void
  /** When set, the CTA renders as a plain anchor to this URL. */
  ctaHref?: string
  /** Visually highlight as the recommended / popular plan. */
  recommended?: boolean
  /** Optional badge content (e.g. "Most popular"). */
  badge?: JSX.Element
  /** Extra classes. */
  className?: string
}

Functions

SubscriptionPlanCard(props)

Pricing / subscription plan card. Renders header (badge + name + description), price + interval, feature checklist, and a primary CTA (button or link).

function SubscriptionPlanCard(props: SubscriptionPlanCardProps): JSX.Element
  • props — Component props (see SubscriptionPlanCardProps).

Returns: The rendered subscription plan card.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.5.0
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • Must render inside the app's i18n and ClassMap providers (useTranslation() / getClassMap() fall back to the bonded providers, and throw when neither is wired).

  • Prefer onCta with your router's navigate function for SPA navigation; ctaHref renders a plain anchor and causes a full page load.

  • recommended highlights the card (outline + primary CTA color) and, when badge is omitted, shows a "Recommended" badge via the plan.recommended i18n key.

  • price/interval are opaque display nodes — the app owns currency formatting and localization.

Translations

Translation strings are provided by @molecule/app-locales-subscription-plan-card.