PricingTable

Helps users understand different pricing plans to choose from.

PricingTable

To implement PricingTable component into your project you’ll need to the import at least the PricingTable and the PricingTableItem:

import PricingTable, { PricingTableItem } from "@kiwicom/orbit-components/lib/PricingTable";

After adding import into your project you can use it simply like:

<PricingTable>
<PricingTableItem>content</PricingTableItem>
<PricingTableItem>content</PricingTableItem>
</PricingTable>

Props

Table below contains all types of the props available in the PricingTable component.

NameTypeDefaultDescription
activeElementnumberSets default active element on mobile view
childrenReact.NodeThe content of the PricingTable. See Subcomponents
dataTeststringOptional prop for testing purposes.
hasErrorbooleanShows error state
desktopRadiobooleanShows Radio buttons also on desktop version

Subcomponents

PricingTable component needs to be used with it’s subcomponent PricingTableItem

PricingTableItem

import PricingTable, { PricingTableItem } from "@kiwicom/orbit-components/lib/PricingTable";

Props

Table below contains all types of the props in the PricingTableItem component.

NameTypeDefaultDescription
actionReact.NodeArea for action elements, like Button.
activebooleanShows active state.
badgestring \| React.NodeBadge above the PricingTableItem, works with Badge.
childrenReact.NodeContent of the PricingTableItem component.
dataTeststringOptional prop for testing purposes.
featureIconReact.NodeFeature Icon displayed at top of the PricingTableItem .
mobileDescriptionTranslationDescription of PricingTableItem, displayed on mobile.
nameTranslationName of PricingTableItem.
onClick() => void \| PromiseFunction for handling the onClick event.
priceTranslationPrice of item.
priceBadgeReact.NodeBadge instead of price, work with Badge.