Patterns
TermsHelp players find the terms that apply to their account and the services they use.
Example
A terms overview with local mock data. Document titles and counts are illustrative. Every document link opens the same example document in a new tab; it contains no actual terms.
Expand Prova exemplets tillstånd to try loading and error states independently for each list. Choose Inläst to restore its documents.
Anatomy
- Heading and introduction. Explain what the terms cover.
- Basic customer terms. A filled card headed Grundläggande kundvillkor.
- Service-specific terms. A second card headed Tjänstespecifika kundvillkor.
- Document row. A full-width link with a title, separator and external-link icon.
Behaviour
Group documents by purpose and preserve the order supplied by the content source. Each document opens in a new tab, keeping the list available in the original tab.
The cards use a centred, single-column layout with a maximum width of 42rem. Long document titles wrap, while the external-link icon stays visible at the end of the row.
States
- Loaded. Show each group's heading and document links.
- Loading. Keep the group heading and replace rows with skeletons. The example reserves three rows for basic terms and seven for service-specific terms.
- Error. Keep the card and heading, and replace the list with Innehåll kunde inte läsas in. The other group remains available.
In Nova an empty CMS response is treated as an error, so there is no separate empty state. The example follows that behaviour.
Accessibility
- Each document group is a section labelled by its heading.
- The full document row is a keyboard-accessible link with a visible focus indicator.
- The external-link icon is decorative. Hidden text announces that the document opens in a new tab.
- Loading marks the list busy and provides a status message; skeletons are hidden from assistive technology.
- Errors are announced in text within the affected group.
Implementation
The source is apps/services/account-tur/src/app/(pages)/villkor-och-integritet in Nova. The Villkor page loads two CMS folders through separate server components and Suspense boundaries. Document links combine the CDN base URL with the CMS document path.
The introduction, group headings, document-row layout, loading skeletons and error copy follow the source. Named sections, hidden new-tab text and loading/error announcements are accessibility additions in this example.
The block replaces that data layer with mocks/documents.ts and explicit state controls. It uses Card, Separator, Skeleton and ExternalLink from @svenskaspel/ui. The local HTML document is only a demonstration destination; supply actual document titles and URLs from the application's content source when integrating the pattern.
The surrounding application navigation to Personuppgifter and Spelregler and the customer-service footer are outside this example. Documentation is in English; the example uses Swedish interface copy.