{`There is no default export for the product card package. Instead, there are a collection of components for you to compose together to fit your specific needs.`}
{`Note: If you are using this component within a React Server Component (like the NextJS 13 App Router), it is suggested to import `}{`ProductCardHeaderName`}{`, `}{`ProductCardHeaderPrice`}{`, `}{`ProductCardHeaderPaymentFrequency`}{`,`}{`ProductCardHeaderSmallText`}{`, `}{`ProductCardHeaderStrikeThroughPrice`}{`, `}{`HospitalTiersBadgeModalButton`}{` and `}{`HospitalTiersBadgeModalModal`}{` individually.`}
\n
\n
{`Interactive demo`}
\n
{`\n Our most popular hospital product in NSW\n \n \n Basic Essential Hospital Plus\n $254.31\n
\n 165.57\n Weekly\n
\n {/* $175.20 from April 1 */}\n Select my cover\n\n *With an age-based discount applied\n \n\n \n \n \n Cover for the basics, like accidental injury benefit, some specific hospital services and emergency ambulance cover with no annual limits.\n \n\n \n \n console.log('open')} onInclusionModalClose={() => console.log('close')} inclusions={procedures} productId={1} isStatic={false} />\n\n Select my cover\n \n \n \n \n\n`}
\n
\n
{`Note:`}{` `}{`GreyBox`}{` is not a product card component, it is purely for demonstration purposes.`}
\n
\n
{`Props`}
\n
{`HighlightMessage`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`children`}{` `}{`(required)`}
\n
{`node`}
\n
\n
{`The message to display above the highlighted product card. All children will be rendered inside our `}{``}{` component.`}
\n
\n \n
\n
{`ProductCardWrapper`}
\n
{`All props passed to `}{``}{` will be applied to the underlying `}{`
`}{` as attributes.`}\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`type`}{` `}{`(required)`}
\n
{`string`}
\n
\n
{`The type of product the card is displaying. Must be one of `}{`hospital`}{`, `}{`extras`}{` or `}{`combined`}{`.`}
\n
\n
\n
{`tier`}
\n
{`string`}
\n
\n
{`The tier of the hospital product. Not to be used on extras. Must be one of `}{`'basic'`}{`, `}{`'basic-plus'`}{`, `}{`'bronze'`}{`, `}{`'bronze-plus'`}{`, `}{`'silver'`}{`, `}{`'silver-plus'`}{` or `}{`'gold'`}{`.`}
\n
\n
\n
{`space`}
\n
{`number or object`}
\n
\n
{`Spacing value to be passed to internal stack component. A size from our `}{`spacing scale`}{`. Can be made responsive by passing an object of breakpoints. Value(s) must be one of `}{`1...10`}{`.`}
\n
\n
\n
{`children`}
\n
{`node`}
\n
\n
{`The contents of the card.`}
\n
\n \n
\n
{`ProductCardHeader`}
\n
{`\n \n \n Gold Top Hospital\n $254.31\n
\n {/*
is to group together in the stack */}\n 165.57\n Weekly\n
\n $175.20 from April 1\n Select my cover\n\n *With an age-based discount applied\n \n \n\n`}\n
\n
{`Note:`}{` `}{`GreyBox`}{` is not a product card component, it is purely for demonstration purposes.`}
\n
\n
{`All props passed to `}{``}{` will be applied to the underlying `}{`
`}{` as attributes.`}\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`type`}{` `}{`(required)`}
\n
{`string`}
\n
\n
{`The type of product the card is displaying. Must be one of `}{`hospital`}{`, `}{`extras`}{` or `}{`combined`}{`.`}
\n
\n
\n
{`tier`}
\n
{`string`}
\n
\n
{`The tier of the hospital product. Not to be used on extras. Must be one of `}{`'basic'`}{`, `}{`'basic-plus'`}{`, `}{`'bronze'`}{`, `}{`'bronze-plus'`}{`, `}{`'silver'`}{`, `}{`'silver-plus'`}{` or `}{`'gold'`}{`.`}
\n
\n
\n
{`space`}
\n
{`number or object`}
\n
{`6`}
\n
{`Spacing value to be passed to internal stack component. A size from our `}{`spacing scale`}{`. Can be made responsive by passing an object of breakpoints. Value(s) must be one of `}{`1...10`}{`.`}
\n
\n
\n
{`height`}
\n
{`number`}
\n
\n
{`A min-height for the prduct card header, in pixels.`}
\n
\n
\n
{`isLoading`}
\n
{`boolean`}
\n
{`false`}
\n
{`Renders the `}{`Loader`}{` component if true.`}
\n
\n
\n
{`children`}
\n
{`node`}
\n
\n
{`The contents of the card.`}
\n
\n \n
\n
{`The `}{`ProductCardHeader`}{` has a number of sub-components.`}
\n
{`Basic Hospital\n45.00\nWeekly\n\n900.00\n`}
\n
{`All subcomponents expect children.`}
\n
{`ProductCardHeader.Name`}
\n
{`The product name is rendered as an `}{`
`}
{` by default. It is important that pages have semantic heading hierarchy for screen reader users.`}
\n
{`To alter this heading level to suit your page structure you can use the styled-components polymorphic `}{`as`}{` prop:`}
\n
{`Basic Hospital\nBasic Hospital //If you cannot know for sure the heading hierarchy of the page a div is safest\n`}
\n
{`ProductCardHeader.Price`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`hasDisclaimer`}
\n
{`boolean`}
\n
{`false`}
\n
{`Whether the price should have an asterisk appended to the end.`}
\n
\n
\n
{`titleComponent`}
\n
{`string`}
\n
\n
{`The underlying component of the ProductCardHeader `}{`Price`}{`. Must be one of `}{`h1`}{`, `}{`h2`}{`, `}{`h3`}{`, `}{`h4`}{`, `}{`h5`}{`, `}{`h6`}{`, `}{`div`}{`, `}{`label`}{`, `}{`span`}{`, `}{`header`}{`.`}
\n
\n \n
\n
{`ProductCardBody`}
\n
{`All props passed to `}{``}{` will be applied to the underlying `}{`
`}{` as attributes.`}\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`space`}
\n
{`number or object`}
\n
{`6`}
\n
{`Spacing value to be passed to internal stack component. A size from our `}{`spacing scale`}{`. Can be made responsive by passing an object of breakpoints. Value(s) must be one of `}{`1...10`}{`.`}
\n
\n
\n
{`isUnavailable`}
\n
{`boolean`}
\n
{`false`}
\n
{`Renders an overlay over the product card body when unavailable.`}
\n
\n
\n
{`children`}
\n
{`node`}
\n
\n
{`The contents of the card.`}
\n
\n \n
\n
{`HospitalTiersBadgeModal`}
\n
{`A button that opens a modal to explain the hospital tiers, highlighting the passed in tier. `}{`-plus`}{` tiers are omitted from the modal for brevity unless the selected tier is one of \"basic-plus\", \"bronze-plus\" or \"silver-plus\".`}
\n
{`Should not be included in Extras product cards.`}
\n
{`\n`}
\n
{`The hospital tier heading is rendered as an `}{`
`}
{` within a `}{`{` by default. It is important that pages have semantic heading hierarchy for screen reader users.`}
\n
{`To alter this heading level to suit your page structure you can use the styled-components polymorphic `}{`as`}{` prop:`}
\n
{`\n //If you cannot know for sure the heading hierarchy of the page a div is safest\n`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`tier`}{` `}{`(required)`}
\n
{`string`}
\n
\n
{`The tier of the hospital product. Not to be used on extras. Must be one of `}{`'basic'`}{`, `}{`'basic-plus'`}{`, `}{`'bronze'`}{`, `}{`'bronze-plus'`}{`, `}{`'silver'`}{`, `}{`'silver-plus'`}{` or `}{`'gold'`}{`.`}
\n
\n \n
\n
{`The `}{`HospitalTiersBadgeModal`}{` has a number of sub-components, which are not to be used in conjunction with parent component but to allow different implementations:`}
\n
{`Basic Hospital\n\n`}
\n
{`HospitalTiersBadgeModal.Button`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`onClick`}{` `}{`(required)`}
\n
{`function`}
\n
\n
{`An event handler function to open modal.`}
\n
\n
\n
{`children`}{` `}{`(required)`}
\n
{`string`}
\n
\n
{`The button label.`}
\n
\n
\n
{`as`}
\n
{`string or React Component`}
\n
{`h4`}
\n
{`Applied to underlying Heading component to change heading level.`}
\n
\n \n
\n
{`HospitalTiersBadgeModal.Modal`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`visible`}{` `}{`(required)`}
\n
{`boolean`}
\n
\n
{`Whether the Modal is being displayed.`}
\n
\n
\n
{`onClose`}{` `}{`(required)`}
\n
{`function`}
\n
\n
{`An event handler function to close modal.`}
\n
\n
\n
{`tier`}{` `}{`(required)`}
\n
{`string`}
\n
\n
{`The tier of the hospital product. Not to be used on extras. Must be one of `}{`'basic'`}{`, `}{`'basic-plus'`}{`, `}{`'bronze'`}{`, `}{`'bronze-plus'`}{`, `}{`'silver'`}{`, `}{`'silver-plus'`}{` or `}{`'gold'`}{`.`}
\n
\n
\n
{`mbpUrl`}
\n
{`string`}
\n
\n
{`The button label.`}
\n
\n
\n
{`titleComponent`}
\n
{`string`}
\n
\n
{`The underlying component of the HospitalTiersBadgeModal `}{`TiersModal`}{`. Must be one of `}{`h1`}{`, `}{`h2`}{`, `}{`h3`}{`, `}{`h4`}{`, `}{`h5`}{`, `}{`h6`}{`, `}{`div`}{`, `}{`label`}{`, `}{`span`}{`, `}{`header`}{`.`}
\n
\n \n
\n
{`MinHeight`}
\n
{`Forcing subsections of product cards to align with different content lengths unfortunately requires setting some fixed min-heights.`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`height`}{` `}{`(required)`}
\n
{`number or object`}
\n
\n
{`The value in `}{`px`}{` for the `}{`min-height`}{`. Useful for faking equal height product cards with varying contents. Can be made responsive by passing an object of breakpoints.`}
\n
\n \n
\n
{`ResponsiveInclusionList`}
\n
{`If product cards are stacking on mobile, inclusions list should collapse behind a toggle to save vertical space. This component hides the inclusion list below the `}{`xxl`}{` breakpoint by default.`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`breakpoint`}
\n
{`string`}
\n
{`'xxl'`}
\n
{`Must be one of our standard breakpoints: `}{`'xs'`}{`, `}{`'sm'`}{`, `}{`'md'`}{`, `}{`'lg'`}{`, `}{`'xl'`}{`, `}{`'xxl'`}{` or `}{`'xxxl'`}{`.`}
\n
\n
\n
{`space`}
\n
{`number or object`}
\n
\n
{`Spacing value to be passed to internal stack component. A size from our `}{`spacing scale`}{`. Can be made responsive by passing an object of breakpoints. Value(s) must be one of `}{`1...10`}{`.`}
\n
\n \n
\n
{`InclusionList`}
\n
{`A list of inclusions. Static or dynamic.`}
\n
\n \n
\n
{`Prop`}
\n
{`Type`}
\n
{`Default`}
\n
{`Description`}
\n
\n \n \n
\n
{`isStatic`}
\n
{`boolean`}
\n
{`false`}
\n
{`To just display the inclusion name and coverType icon, with no onCLick or modal for further detail.`}
\n
\n
\n
{`inclusions`}{` `}{`(required)`}
\n
{`array`}
\n
\n
{`Each item in the array should match the below structure.`}
\n
\n
\n
{`products`}{` `}{`(required)`}
\n
{`array`}
\n
\n
{`Each item in the array should match the below structure.`}
\n
\n
\n
{`productId`}
\n
{`number`}
\n
\n
{`The id of the product. Required for extras products with dynamic inclusion lists to highlight the correct row in the `}{`AnnualLimitsTable`}{`.`}
\n
\n
\n
{`limitsForActiveServiceForEachProduct`}
\n
{`array`}
\n
\n
{`Each item in the array should match the below structure.`}
\n
\n
\n
{`onInclusionModalOpen`}
\n
{`function`}
\n
\n
{`A function to call when the inclusion modal opens.`}
\n
\n
\n
{`onInclusionModalClose`}
\n
{`function`}
\n
\n
{`A function to call when the inclusion modal closes.`}
\n
\n
\n
{`policyBookletLink`}
\n
{`string`}
\n
{`'/docs/policy-booklet'`}
\n
{`Each.`}
\n
\n
\n
{`serviceComponent`}
\n
{`object`}
\n
\n
{`When supplied, informs the component that ServiceComponent inclusions are being displayed, will adjust the modal accordingly.`}
{`A function that is called as the inclusion modal opens. Generally to be used with an extras product to load the appropriate annualLimits data for the active `}{`inclusion`}{`.`}
\n
{`You must ensure that the `}{`products`}{` prop is also passed in to the `}{`InclusionList`}{` as this function is called with fixed arguments:`}
{`This hook is `}{`very`}{` specific to our usecase and will likely not support any other cases. If you need this function to be more flexible for your usecase, please open an issue or PR.`}
\n
{`onInclusionModalClose`}
\n
{`A function that is called as the inclusion modal closes. Generally to be used with an extras product to clear the annualLimits data for the active `}{`inclusion`}{`.`}
\n
{`policyBookletLink`}
\n
{`The url of the link to the policy booklet referenced in many of the modals. Not needed if your `}{`InclusionList`}{` is static. Required if your product card is being whitelabelled.`}
\n
{`Optional. A `}{`string`}{`. Defaults to `}{`'/docs/policy-booklet'`}{`.`}
\n
{`Considerations`}
\n
{`Product card groups`}
\n
{`Product cards can be used individually or in a group of two or more cards. When displaying a product card group, arrange the products in a continuum from cheapest (first) to most expensive (last).`}
\n
{`Product highlight`}
\n
{`A product card can contain a product highlight, appearing as a sentence above a product card. A product highlight assigns a card more emphasis within a product card group. Only highlight one card in a product card group and should be used to call out a recommended product or value for money product.`}
\n
{`Long benefit lists`}
\n
{`If you have a long benefit list, users may not scroll down beyond the list. Ensure no pertinent content appears below the product card, or alternatively apply a toggle to the benefit list so it is hidden until a user requests it.`}