Skip to content

Pill

<ns-pill>

Overview

A small coloured highlight which can be used to visually draw a customer's attention to a piece of information.

✨ This is an auto-generated AI summary of the ns-pill's documentation. It may not be accurate. ✨

The component is a small coloured highlight. Use ns-pill to highlight a small item of information to a customer. Within the British Gas experience, they are often used to attract attention to a promotional message or a notification. Only display a small detail of the content. The ns-pill component should not contain lengthy or complex information.

Pills can help to create a subtle sense of urgency or to draw a customer’s attention to the value of a product or service. For example, use them to highlight the date a promotional offer expires or to feature a gift offer.

Examples

Guidance

Standard

Labelled diagram of ns-pill

Key

KeyField typeGuidelines
AIconOptional. To draw additional attention, provide clarity and to aid recognition.
BAnonymous slotBe concise and catchy, ideally between 1 and 4 words. Content should not run over more than one line on a squash-court viewport.
CCaveatUse a link to <ns-caveat>.

Implementation

Placement

The ns-pill component can be used in the following components:

Specification

Attributes

colour
Property
colour
Description
The decorative background colour of the pill.
Type
string
Options
cyan lime navy forest slate orange red yellow
Default
slate
icon
Property
icon
Description
The decorative icon to provide visual aid to the content of the pill.
Type
string
Options
Refer to our icons.
Default
type
Property
type
Type
string
Default
standard

Slots

SlotPermitted tagsDescription
Anonymous slotThe anonymous slot for pill text.

Figma

Please note: The ns-pill Figma component configuration instructions are available only to members of the British Gas workspace who have access to the Nucleus Figma UI Kit.

Last updated: