Comparison
Side-by-side comparisons for features and specifications
Use the Comparison
component to present side-by-side comparisons of features, specifications, or options to help users make informed decisions. You can use them to compare pricing and plans, tiers or service packages.
Feature | Free | Pro |
---|---|---|
Image Carousel | ||
Customizable CTA | ||
Sticky CTA | ||
Add Pricing |
The Comparison
component is an extended version of the Table
component, meaning you can use the component with existing Table
component props. The above example uses the following Comparison
component-specific props:
data
: Thedata
prop is capable of handlingtrue
andfalse
values that renders a check or x icon.trueColor
: Sets the color of icons rendered bytrue
values.falseColor
: Sets the oclor of icons rendered byfalse
values.
If no trueColor
and falseColor
props are present, the icons will take the text color:
Feature | Free | Pro |
---|---|---|
Image Carousel | ||
Customizable CTA | ||
Sticky CTA | ||
Add Pricing |
Icons
You can customize the default icons using the trueIcon
and falseIcon
props which must be an SVG string. For example:
Feature | Free | Pro |
---|---|---|
Image Carousel | ||
Customizable CTA | ||
Sticky CTA | ||
Add Pricing |
API
Please see the documentation of the
Table
component for the TableProps
type. Prop | Default | Purpose |
---|---|---|
data | [] | Sets the table cells. Must be a multidimensional array of strings or booleans. |
trueIcon | circle-check | Sets the icon used for true values in the data prop. |
falseIcon | circle-close | Sets the icon used for false values in the data prop. |
trueColor | var(--w-color-primary) | Sets the color of icons when using true . |
falseColor | var(--w-color-primary) | Sets the color of icons when using false . |