Skip to content

Download

<ns-download>

Overview

Highlights an item that can be downloaded.

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 URL of the file to download.
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.
Type
string
Options
pdf xls
Default

type

Property
type
Type
string
Default
standard

Slots

SlotPermitted tagsDescription
Anonymous slotAnonymous slot for content.

Specification notes

File type

If the href attribute contains one of the following file extensions: .pdf, .xls, then the file-type attribute will have no effect.

Last updated: