āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/components/billing/pricing-table ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
<PricingTable />'
description: Clerk's <PricingTable /> component displays a table of Plans and Features that users can subscribe to.
sdk: astro, chrome-extension, expo, nextjs, nuxt, react, react-router, remix, tanstack-react-start, vue, js-frontend
The <PricingTable /> component displays a table of Plans and Features that users can subscribe to.
<If sdk={["astro", "chrome-extension", "expo", "nextjs", "nuxt", "react", "react-router", "remix", "tanstack-react-start", "vue"]}
The following example includes a basic implementation of the <PricingTable /> component. You can use this as a starting point for your own implementation.
export default function Page() {
return <PricingTable />
}
```
</If>
<If sdk="react">
```tsx {{ filename: 'src/App.tsx' }}
import { PricingTable } from '@clerk/clerk-react'
function App() {
return <PricingTable />
}
export default App
```
</If>
<If sdk="astro">
```astro {{ filename: 'pages/pricing.astro' }}
---
import { PricingTable } from '@clerk/astro/components'
---
<PricingTable />
```
</If>
<If sdk="expo">
<Include src="_partials/expo/web-only-callout" />
```jsx {{ filename: '/app/pricing.web.tsx' }}
import { PricingTable } from '@clerk/clerk-expo/web'
export default function PricingPage() {
return <PricingTable />
}
```
</If>
<If sdk="chrome-extension">
```jsx {{ filename: 'src/routes/pricing.tsx' }}
import { PricingTable } from '@clerk/chrome-extension'
export default function PricingPage() {
return <PricingTable />
}
```
</If>
<If sdk="react-router">
```tsx {{ filename: 'app/routes/pricing.tsx' }}
import { PricingTable } from '@clerk/react-router'
export default function PricingPage() {
return <PricingTable />
}
```
</If>
<If sdk="remix">
```tsx {{ filename: 'app/routes/pricing.tsx' }}
import { PricingTable } from '@clerk/remix'
export default function PricingPage() {
return <PricingTable />
}
```
</If>
<If sdk="tanstack-react-start">
```tsx {{ filename: 'app/routes/pricing.tsx' }}
import { PricingTable } from '@clerk/tanstack-react-start'
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/pricing')({
component: PricingPage,
})
function PricingPage() {
return <PricingTable />
}
```
</If>
<If sdk="vue">
```vue {{ filename: 'pricing.vue' }}
<script setup lang="ts">
import { PricingTable } from '@clerk/vue'
</script>
<template>
<PricingTable />
</template>
```
</If>
<If sdk="nuxt">
```vue {{ filename: 'pages/pricing.vue' }}
<script setup lang="ts">
// Components are automatically imported
</script>
<template>
<PricingTable />
</template>
```
</If>
</If>
<If sdk="js-frontend">
## Usage with JavaScript
The following methods available on an instance of the Clerk class are used to render and control the <PricingTable /> component:
The following examples assume that you followed the quickstart to add Clerk to your JavaScript app.
mountPricingTable()function mountPricingTable(node: HTMLDivElement, props?: PricingTableProps): void
mountPricingTable() paramsThe container `<div>` element used to render in the `<PricingTable />` component
---
- `props?`
- [`PricingTableProps`](#properties)
The properties to pass to the `<PricingTable />` component
</Properties>
mountPricingTable() usageimport { Clerk } from '@clerk/clerk-js'
// Initialize Clerk with your Clerk Publishable Key
const clerkPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
const clerk = new Clerk(clerkPubKey)
await clerk.load()
document.getElementById('app').innerHTML = `
<div id="pricing-table"></div>
`
const pricingTableDiv = document.getElementById('pricing-table')
clerk.mountPricingTable(pricingTableDiv)
unmountPricingTable()function unmountPricingTable(node: HTMLDivElement): void
unmountPricingTable() paramsThe container `<div>` element with a rendered `<PricingTable />` component instance
</Properties>
unmountPricingTable() usageimport { Clerk } from '@clerk/clerk-js'
// Initialize Clerk with your Clerk Publishable Key
const clerkPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
const clerk = new Clerk(clerkPubKey)
await clerk.load()
document.getElementById('app').innerHTML = `
<div id="pricing-table"></div>
`
const pricingTableDiv = document.getElementById('pricing-table')
clerk.mountPricingTable(pricingTableDiv)
// ...
clerk.unmountPricingTable(pricingTableDiv)
</If>
All props are optional.
<Properties> - `appearance` - <code>[Appearance](/docs/guides/customizing-clerk/appearance-prop/overview) | undefined</code>Optional object to style your components. Will only affect Clerk components and not Account Portal pages.
checkoutProps{ appearance: Appearance }Options for the checkout drawer. Accepts the following properties:
appearance: an object used to style your components. Will only affect Clerk components and not Account Portal pages.collapseFeaturesbooleanA boolean that indicates whether the features are collapsed. Requires layout to be set to 'default'. Defaults to false.
ctaPosition'top' | 'bottom'The placement of the CTA button. Requires layout to be set to 'default'. Defaults to 'bottom'.
fallbackJSXAn optional UI to show when the pricing table is loading.
for'user' | 'organization'A string that indicates whether the pricing table is for users or organizations. If 'user', the pricing table will display a list of plans and features that users can subscribe to. If 'organization', the pricing table will display a list of plans and features that organizations can subscribe to. Defaults to 'user'.
newSubscriptionRedirectUrlstringThe URL to navigate to after the user completes the checkout and selects the "Continue" button. </Properties>
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā