0.1.1-alpha.60 • Published 13 days ago

@gemeente-denhaag/file v0.1.1-alpha.60

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
13 days ago

File

A file displays a link to download an attachment and shows metadata about the file.

When to use

A file is used to present and download a file that is uploaded by the user or an employee.

Alternatives and related components

None.

Anatomy

The file consists of:

  1. File name: the name of the file
  2. Preview: shows an icon of the type of the file (e.g. document, image)
  3. Navigational link: shows the download option
  4. Container

(Interactive) states

The file contains the states normal, hover and focus.

Design properties

Typography

  • File name: TheSans/md/400

Color

  • File name: text color Grey/4
  • Preview: icon svg color Grey/4, border color Grey/2
  • Container: border color Grey/2

Interactive states

  • Hover: title text color Blue/3, icon svg color Blue/3, container background-color warm/grey
  • Focus: title text color Grey/4, icon svg color Grey/4, container border color Ocher/5

Structure

  • File name: padding-left and padding-right 16px
  • Preview: icon size 24px, icon padding 16px
  • Navigational link: padding-left and padding-right 16px
  • Container: min-height 56px, padding-top and padding-bottom 16px, margin-bottom 16px, border 1px

Mobile

  • File name: padding-bottom 8px, padding-left and padding-right 16px
  • Navigational link: padding-left 16px
  • Preview: icon size 24px, icon padding-left and padding-right 16px
  • Container: padding-top and padding-bottom 12px

Accessibility

In order to comply with accessibility standards you should not force a file to open in a new tab. It must be left up to the user to decide whether to download a file, or open in a new tab.

The one exception to this rule is in forms as there are often challenges around caching user data. When ns-download is used within ns-form; if the browser can display the file type it will open in a new tab.

Content guidelines

None.

Best practices

Dos

Files download should:

  • Be used for all downloads.
  • Include file size and type. Showing the file size is particularly nice for users that are on reduced data allowences (i.e. mobile), and also offers an indication on how long a file might take to download.

Don’ts

Files download should:

  • Not be described as a file.

References

https://ons-design-system.netlify.app/components/downloads/

0.1.1-alpha.60

13 days ago

0.1.1-alpha.59

20 days ago

0.1.1-alpha.58

20 days ago

0.1.1-alpha.57

27 days ago

0.1.1-alpha.56

1 month ago

0.1.1-alpha.55

2 months ago

0.1.1-alpha.54

2 months ago

0.1.1-alpha.53

2 months ago

0.1.1-alpha.52

2 months ago

0.1.1-alpha.51

2 months ago

0.1.1-alpha.50

2 months ago

0.1.1-alpha.49

2 months ago

0.1.1-alpha.48

3 months ago

0.1.1-alpha.47

3 months ago

0.1.1-alpha.46

3 months ago

0.1.1-alpha.45

3 months ago

0.1.1-alpha.44

3 months ago

0.1.1-alpha.43

3 months ago

0.1.1-alpha.42

4 months ago

0.1.1-alpha.41

4 months ago

0.1.1-alpha.40

4 months ago

0.1.1-alpha.39

4 months ago

0.1.1-alpha.38

4 months ago

0.1.1-alpha.37

4 months ago

0.1.1-alpha.36

4 months ago

0.1.1-alpha.35

4 months ago

0.1.1-alpha.34

4 months ago

0.1.1-alpha.33

4 months ago

0.1.1-alpha.32

5 months ago

0.1.1-alpha.31

5 months ago

0.1.1-alpha.30

6 months ago

0.1.1-alpha.29

6 months ago

0.1.1-alpha.28

6 months ago

0.1.1-alpha.27

6 months ago

0.1.1-alpha.26

6 months ago

0.1.1-alpha.25

6 months ago

0.1.1-alpha.24

7 months ago

0.1.1-alpha.23

7 months ago

0.1.1-alpha.22

7 months ago

0.1.1-alpha.21

7 months ago

0.1.1-alpha.20

7 months ago

0.1.1-alpha.19

7 months ago

0.1.1-alpha.18

7 months ago

0.1.1-alpha.17

8 months ago

0.1.1-alpha.16

8 months ago

0.1.1-alpha.15

8 months ago

0.1.1-alpha.14

8 months ago

0.1.1-alpha.13

8 months ago

0.1.1-alpha.12

8 months ago

0.1.1-alpha.11

8 months ago

0.1.1-alpha.10

8 months ago

0.1.1-alpha.9

8 months ago

0.1.1-alpha.8

8 months ago

0.1.1-alpha.7

8 months ago

0.1.1-alpha.6

8 months ago

0.1.1-alpha.5

8 months ago

0.1.1-alpha.4

8 months ago

0.1.1-alpha.3

8 months ago

0.1.1-alpha.2

8 months ago

0.1.1-alpha.1

8 months ago

0.1.1-alpha.0

8 months ago