Skip to content

Download

<ns-download>

Overview

Highlights an item that can be downloaded.

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

The ns-download component creates the visual and semantics of the action of downloading an asset, as opposed to navigation. It can be used singularly or as a list of downloads for multiple files.

Examples

Guidance

Standard

Labelled diagram of ns-download

Key

KeyField typeGuidelines
AFile descriptionProvide a description of what the file is and or contains.
BFile typeThe component will pick the file type from the file (if it isn’t a format supported by the component, you need to provide a file type attribute).
CFile sizeAccurate file size in whichever unit that makes the most sense: B, kB, MB, GB.

Implementation

Placement

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

Specification

Attributes

href
Property
href
Description
The link to the file to be downloaded.
Type
string
Default
file-size
Property
fileSize
Description
The size of the file to download.
Type
string
Options
B kB MB GB
Default
file-type
Property
fileType
Description
The type of the file to download. This is required when file extension is not present in `href` link value.
Type
string
Options
pdf xls
Default
type
Property
type
Type
string
Default
standard

Slots

SlotPermitted tagsDescription
Anonymous slotThe anonymous slot for text content and needs to be related the file to download.

Figma

Please note: The ns-download 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: