Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
fde17a3
Update consent-banner.mdx
frankdahle Jun 2, 2026
e00db75
titles and lists
mrosvik Jun 2, 2026
090292f
code
mrosvik Jun 2, 2026
2545d44
Made the language more active
mrosvik Jun 2, 2026
b019564
added images and clearified placement together with skiplink
mrosvik Jun 2, 2026
2f1a1f0
add examples
mrosvik Jun 3, 2026
ae90197
improve alt texts, fix typos, add contributors
mrosvik Jun 3, 2026
bec0e26
add do dont examples
mrosvik Jun 3, 2026
6e68292
removed repetitions
mrosvik Jun 3, 2026
f8cb646
Merge branch 'main' into Cookie-banner
mrosvik Jun 3, 2026
db59a8d
examples
mrosvik Jun 3, 2026
6d0c139
Merge branch 'Cookie-banner' of https://github.com/digdir/designsyste…
mrosvik Jun 3, 2026
287c5dc
new image as suggested by @magnusrand
mrosvik Jun 3, 2026
1f98399
remove duplicated button
mrosvik Jun 3, 2026
4c61e10
add disclamer
mrosvik Jun 3, 2026
c696231
add disclamer and a new story
mrosvik Jun 3, 2026
6a844f0
Refine wording
mrosvik Jun 3, 2026
8dd4e72
move technology-neutral consent guidance earlier
mrosvik Jun 3, 2026
0116574
Removed unused link
mrosvik Jun 3, 2026
749d982
fix some sentences
mrosvik Jun 3, 2026
f3e4cd0
Feedback from @dortedrange
mrosvik Jun 4, 2026
f646825
changed the title since it is not only about how the website is used.
mrosvik Jun 4, 2026
6f16b99
removed duplicate sentence
mrosvik Jun 4, 2026
eb99a5b
new image for video
mrosvik Jun 4, 2026
452d6db
simplified the sentence for updating consent
mrosvik Jun 4, 2026
c7f0077
remove title
mrosvik Jun 4, 2026
96315a0
merged two paragraphs
mrosvik Jun 4, 2026
00385a8
shortened the preparations chapter.
mrosvik Jun 4, 2026
7a3e542
the article has not yet been translated into English
mrosvik Jun 4, 2026
c5c20d1
fix sentence
mrosvik Jun 4, 2026
1d759c1
combine paragraphs
mrosvik Jun 4, 2026
4946822
as suggested by @Febakke
mrosvik Jun 4, 2026
9fa7ed8
add space
mrosvik Jun 4, 2026
fdaf4b5
specify bottom at page
mrosvik Jun 4, 2026
12b0317
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
05aaa52
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
eecb68f
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
a7e85e1
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
8ee21fe
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
34ca493
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
d1b6b0a
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
2e2648d
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
369c35f
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
14a7123
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
9169ce4
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
8663510
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
ea4d49e
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
1f92199
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
5f4532c
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
d21105b
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
72ac458
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
30c762c
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
e5928f7
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
f473a57
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
fd1335f
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
18920d6
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
86af19e
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
dabfb88
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
262ce1a
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
80f97e0
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
814cab4
Update apps/www/app/content/patterns/no/consent-banner.mdx
mrosvik Jun 5, 2026
28f8dcb
Merge branch 'main' into Cookie-banner
mrosvik Jun 5, 2026
249884c
docs: move consent storage sections to Forberedelser (#4956)
magnusrand Jun 5, 2026
4aefdb5
use consistent second-person voice throughout article
mrosvik Jun 9, 2026
2f2f997
use a more active voice
mrosvik Jun 9, 2026
5d801c9
change start
mrosvik Jun 9, 2026
f3193a3
new video img
mrosvik Jun 9, 2026
5bd66de
video with image
mrosvik Jun 9, 2026
d4cb51a
fix sentence after comment from @Barsnes
mrosvik Jun 9, 2026
3badb79
comments from Marte Seth
mrosvik Jun 9, 2026
e4410f2
add do example
mrosvik Jun 9, 2026
8c80061
add do examples
mrosvik Jun 10, 2026
0edb8f4
simplify code example
mrosvik Jun 10, 2026
e428cd7
add aria-labelledby
mrosvik Jun 10, 2026
792ef9c
remove comments
mrosvik Jun 10, 2026
0636673
Merge branch 'main' into Cookie-banner
mrosvik Jun 10, 2026
1d925a9
add Fieldset to example
mrosvik Jun 10, 2026
58eee56
Merge branch 'Cookie-banner' of https://github.com/digdir/designsyste…
mrosvik Jun 10, 2026
bc00249
remove space
mrosvik Jun 10, 2026
bd4ddd1
add value necessary
mrosvik Jun 10, 2026
3a31efc
add avatars
mrosvik Jun 10, 2026
8cb1f3b
fix from @Camulos
mrosvik Jun 10, 2026
42ccd0b
suggestion from @mimarz
mrosvik Jun 10, 2026
022bdeb
remove unused class
mrosvik Jun 10, 2026
38b897a
add code example with checkboxes
mrosvik Jun 12, 2026
a2a1934
Merge branch 'main' into Cookie-banner
mrosvik Jun 12, 2026
066d5b0
Merge branch 'main' into Cookie-banner
mrosvik Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/www/app/_components/avatar-stack/avatar-stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ const avatarMap = {
brønnøysundregistrene: 'brønnøysundregistrene.svg',
digdir: 'digdir.svg',
designsystemet: 'designsystemet.svg',
entur: 'entur.svg',
helsedirektoratet: 'helsedirektoratet.svg',
'ks digital': 'ksdigital.svg',
ks: 'ks.png',
mattilsynet: 'mattilsynet.svg',
nav: 'nav.svg',
nrk: 'nrk.svg',
'oslo kommune': 'oslokommune.svg',
politiet: 'politiet.svg',
skatteetaten: 'skatteetaten.svg',
} as const;

Expand Down
31 changes: 7 additions & 24 deletions apps/www/app/content/patterns/en/consent-banner.mdx
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
---
title: Consent banner
sidebar_title: Consent banner
category: Upcoming patterns
description: How can we ensure a holistic and accessible approach to managing consent for cookies and tracking technologies?
partners: Digdir, Nav, Skatteetaten ++
title: Ask users for consent to store information
sidebar_title: Consent to store information
category: Ask users for...
description: How to create a consent banner that is understandable, accessible, and gives users genuine choices.
partners: Digdir, Oslo municipality, NAV, The Norwegian Tax Administration, Entur ++
search_terms: consent banner, cookie banner, cookies, consent, privacy
date: 2026-02-16
date: 2026-06-02
order: 75
---

A consent banner should give users genuine control over their own data. At the same time, it must be clear, understandable and accessible to everyone. Today, this is handled differently across public services, both in terms of language, design, equal presentation of choices and technical implementation.

A shared pattern for consent banners can contribute to:

- A more consistent and recognisable user experience
- Equal presentation of choices, without manipulative design
- Improved accessibility and inclusive design
- Clearer distinction between necessary and optional technologies
- A shared understanding of recommended interaction and behaviour

<Card
data-color='warning'
variant="tinted"
>
**Work in progress** \
A cross-agency working group is developing common guidelines and recommendations for this topic during spring 2026. We greatly appreciate input from anyone with relevant experience, insights or results from user testing. You are welcome to contribute in the related [GitHub discussion thread](https://github.com/digdir/designsystemet/discussions/2977).

</Card>
The article has not yet been translated into English, but you can view the Norwegian version here: [Consent banner (Norwegian)](/no/patterns/consent-banner)
91 changes: 91 additions & 0 deletions apps/www/app/content/patterns/no/consent-banner.dodont.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import {
Button,
Checkbox,
Divider,
Fieldset,
Link,
Paragraph,
useCheckboxGroup,
} from '@digdir/designsystemet-react';

export const DontNegations = () => {
return (
<Paragraph>
Ønsker du at vi ikke skal lagre informasjon om deg og dine bruksmønstre?
</Paragraph>
);
};

export const DoNegations = () => {
return (
<Paragraph>Får vi samle informasjon om hvordan nettsiden brukes?</Paragraph>
);
};

export const DontButtons1 = () => {
return (
<>
<Button variant='primary'>Nei, jeg vil ikke ha en bedre tjeneste</Button>
<Button variant='primary'>Ja, jeg vil hjelpe til</Button>
<Button variant='primary'>Godta anbefalte</Button>
<Button variant='primary'>OK</Button>
<Button variant='primary'>Jeg forstår</Button>
</>
);
};

export const DoButtons1 = () => {
return (
<>
<Button variant='primary'>Ja</Button>
<Button variant='primary'>Nei</Button>
<Divider />
<Button variant='primary'>Godta</Button>
<Button variant='primary'>Avslå</Button>
</>
);
};

export const DontButtons2 = () => {
return <Button variant='primary'>Godta bare nødvendige</Button>;
};

export const DoButtons2 = () => {
return (
<>
<Button variant='primary'>Ja</Button>
<Button variant='primary'>Nei</Button>
</>
);
};

export const DontNecessaryCookiesCheckbox = () => {
const { getCheckboxProps } = useCheckboxGroup({
value: ['necessary'],
});

return (
<Fieldset>
<Fieldset.Legend>Hvilken informasjon kan vi lagre?</Fieldset.Legend>
<Checkbox
label='Nødvendige informasjonskapsler'
{...getCheckboxProps({
disabled: true,
value: 'necessary',
})}
/>
<Checkbox label='Statistikk om hvordan nettsiden brukes' />
</Fieldset>
);
};

export const DoNecessaryCookiesCheckbox = () => {
return (
<Paragraph>
<Link href='#nodvendig-informasjon' style={{ color: 'inherit' }}>
Vi lagrer også nødvendig informasjon
</Link>{' '}
som ikke kan velges bort. Dette gjør at nettsiden fungerer og er trygg.
</Paragraph>
);
};
Loading
Loading