Feature Panel
The Feature Panel highlights a handful of key callouts. The Feature Panel is used to showcase our Unique Selling Points (USPs).
Installation
npm install @nib-components/feature-panel
Note: Feature Panel depends on the Icons component and therefore this package must be installed as well.
Usage
import FeaturePanel from '@nib-components/feature-panel';
Note: If you are using this component within a React Server Component (like the NextJS 13 App Router), it is suggested to import
FeaturePanel
andFeaturePanelFeature
individually.
import FeaturePanel, {FeaturePanelFeature} from from '@nib-components/feature-panel';
import FeaturePanel, {FeaturePanelFeature} from from '@nib-components/feature-panel';import {DentalGraphicIcon, AccidentGraphicIcon, AmbulanceGraphicIcon} from '@nib/icons';<FeaturePanel title="Why nib health insurance is worth it"><FeaturePanelFeature icon={DentalGraphicIcon} title="Choose your Extras provider">For Extras like dental and physio, see any provider with professional qualifications recognised by nib.</FeaturePanelFeature><FeaturePanelFeature icon={AccidentGraphicIcon} title="Accidental Injury Benefit">Seek treatment at a hospital Emergency Department within 24 hours of an accident & if you need to be admitted, you'll receive benefits in line with our top hospital cover for the next 90 days.</FeaturePanelFeature><FeaturePanelFeature icon={AmbulanceGraphicIcon} title="Emergency Ambulance">No annual limits on Emergency Ambulance transportation - excludes residents of QLD and TAS who have ambulance services provided by their State Ambulance Schemes.</FeaturePanelFeature></FeaturePanel>
Interactive demo
Props
All props passed to <FeaturePanel/>
will be applied to the underlying <Tiles>
as attributes.
FeaturePanel
Prop | Type | Default | Description |
---|---|---|---|
children (required) | node | Accepts any number of <FeaturePanel.Feature> 's as children but it is recommended to have 3 or 6 featues for the three-column layout to work best. | |
title | string | The feature panel title. | |
titleComponent | string | h2 | The component for the feature panel title. To ensure that you have a logical, semantic heading hierarchy. |
displayIcons | boolean | true | If you wish, you can hide the icons on mobile to match the default <6.0.0 behavior. |
space | number or object | 0 | Spacing value to be passed to internal Tiles 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 . |
color | string | The color of the text (copy and headings) in the panel. Only available in the nib theme. Color options are listed in the Color Tokens section. | |
background | string | The background color of the panel. Only available in the nib theme. Color options are listed in the Color Tokens section. | |
iconFill | string | The fill of the icons in the panel. Only available in the nib theme. Color options are listed in the Color Tokens section. | |
iconAccentFill | string | The accent fill of the icons in the panel. Only available in the nib theme. Color options are listed in the Color Tokens section. |
FeaturePanel.Feature
Prop | Type | Default | Description |
---|---|---|---|
children (required) | node | The feature content. | |
icon (required) | component | The feature icon. Must be a valid Graphic icon defined in @nib/icons . | |
title | string | The feature title. | |
titleComponent | string | h3 | The component for the feature title. To ensure that you have a logical, semantic heading hierarchy. |
Considerations
The Feature Panel can be used to highlight any number of features, however 3 or 6 works best due to the three column layout of the component. We recommend including up to a maximum of 6 key features our users may care about.
There is a special two-column layout for Feature Panel's with 2 or 4 features if required.
Titles
Both the Feature Panel title and the title for each of the features are optional, though it is encouraged that both are included. Titles are best kept short.
Icons
A key visual for this component is the icon denoting each highlighted feature. Icons are required for each feature and must use a Graphic icon. When selecting an appropriate icon be sure to consider any existing uses and associations the icon has to prevent confusion for the user.
Icons can be hidden on small screens if required. This is done to reduce the height of the panel when the features are stacked into a single column on mobile.
Descriptions
Each feature should include a short description in addition to the icon and title. Often it is desired to be able to link to relevant pages for further information on a specific features, and that is fully supported. To do so, import our Link component and use within your feature description.
When writing descriptions, keep them to less than 200 characters. Do not include any other components as children except text and links - no buttons.
Color Tokens
The color tokens you can use for setting the color
, background
, iconFill
, and iconAccentFill
props are:
trueGreen
trueGreen80
trueGreen60
trueGreen40
trueGreen20
brightGreen
brightGreen80
brightGreen60
brightGreen40
brightGreen20
sageGreen
sageGreen80
sageGreen60
sageGreen40
sageGreen20
sunsetPink
sunsetPink80
sunsetPink60
sunsetPink40
sunsetPink20
warmWhite
warmWhite80
warmWhite60
warmWhite40
warmWhite20
clearWhite
deepBlack
white
black