Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
33d4692
feat: add nextjs package
Jul 23, 2026
a30767d
fix: revert components export .. from
Jul 23, 2026
320d44b
fix: remove unneeded linting packages from nextjs package
Jul 23, 2026
817625a
feat: add PageBody and PageFooter
Jul 24, 2026
f0e053b
Merge branch 'main' into feat/setup-nextjs-package
Jul 24, 2026
c4838de
fix: remove duplicate styleLint config
Jul 24, 2026
cb00301
feat: update homepage with content
Jul 27, 2026
d8738b8
chore: update @types/node to v24
Jul 27, 2026
7f276dd
chore: remove unneeded global css
Jul 27, 2026
463de29
Update packages/nextjs/package.json
eelcobosklopper Jul 27, 2026
8023116
Merge branch 'feat/setup-nextjs-package' into feat/add-nextjs-homepage
eelcobosklopper Jul 27, 2026
710e1c9
chore: remove next-env.d.ts
eelcobosklopper Jul 27, 2026
6a374d1
chore: add next-env.d.ts to gitignore
eelcobosklopper Jul 27, 2026
4d91244
feat: add footer and logo
eelcobosklopper Jul 28, 2026
c84c9b8
Merge branch 'feat/add-nextjs-homepage' into feat/setup-nextjs-package
eelcobosklopper Jul 30, 2026
dfd79e8
feat: add distDir nextjs config and cleanup old .next references
eelcobosklopper Jul 30, 2026
d6f8784
fix: remove unrs-resolver from allowBuilds pnpm workspace
eelcobosklopper Jul 30, 2026
5447ac1
fix: grid cell span all
eelcobosklopper Jul 30, 2026
ebc91c9
feat: replace ma-theme with start-theme design tokens
eelcobosklopper Jul 31, 2026
03fb9d1
feat: update content homepage
eelcobosklopper Aug 3, 2026
59e5592
fix: move codeblock out of paragraph
eelcobosklopper Aug 3, 2026
e716008
chore: remove comments from tsconfig
eelcobosklopper Aug 3, 2026
beadaf6
chore: remove eslint config for jsonc
eelcobosklopper Aug 3, 2026
d7780ce
feat: move nextjs project to apps folder and rename to next
eelcobosklopper Aug 5, 2026
2199d98
fix: replace ReactNode with PropsWithChildren
eelcobosklopper Aug 5, 2026
2d185c3
feat: update title
eelcobosklopper Aug 5, 2026
fe017b2
feat: add clean script and cleanup scripts
eelcobosklopper Aug 5, 2026
4c06e9b
feat: update package name to @example/next
eelcobosklopper Aug 6, 2026
cc904df
chore: removed comment
eelcobosklopper Aug 6, 2026
5ef4c6b
chore: update lock file
eelcobosklopper Aug 6, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ pnpm-lock.yaml

# Ignore generated files from Stencil
components.d.ts

# Ignore generated files from Next.js
next-env.d.ts
4 changes: 4 additions & 0 deletions apps/next/app/layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
/* stylelint-disable-next-line */
margin: 0;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dit zou niet nodig zijn als je Utrecht Root gebruikt

36 changes: 36 additions & 0 deletions apps/next/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type { Metadata } from 'next';
import '@amsterdam/design-system-tokens/dist/index.css';
import '@nl-design-system-unstable/start-design-tokens/dist/theme.css';
import { PropsWithChildren } from 'react';
import { Link } from '../components/Link/Link';
import { Logo } from '../components/Logo';
import { PageBody } from '../components/PageBody/PageBody';
import { PageFooter } from '../components/PageFooter/PageFooter';
import { PageHeader } from '../components/PageHeader/PageHeader';
import { SkipLink } from '../components/SkipLink/SkipLink';
import './layout.css';

export const metadata: Metadata = {
description: 'A Next.js example project using components from the NL Design System',
title: 'Next.js example site',
};

export default function RootLayout({ children }: PropsWithChildren) {
return (
<html lang="en" dir="ltr" className="start-theme">
<body>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dit werkt helaas nog niet bij Utrecht, maar dat zou misschien een optie moeten worden

Suggested change
<body>
<PageLayout Component="body">

Je mag er een PR voor maken als je wilt:
https://github.com/nl-design-system/utrecht/blob/main/packages/components-react/page-layout-react/src/index.tsx#L14

Tot die tijd een workaround met <body className="utrecht-page-layout"> ofzo

<SkipLink href="#main">Skip to main content</SkipLink>

<PageHeader>
<Link href="https://nldesignsystem.nl">
<Logo />
</Link>
</PageHeader>

<PageBody id="main">{children}</PageBody>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PageBody is denk ik geen main element zodat er ook ruimte is voor een aside buiten de main, dus ik denk dat je expliciet er een <main id="main"> in moet nesten.


<PageFooter />
</body>
</html>
);
}
170 changes: 170 additions & 0 deletions apps/next/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
import { Alert } from '@/components/Alert/Alert';
import { CodeBlock } from '@/components/CodeBlock/CodeBlock';
import { Grid, GridCell } from '@/components/Grid/Grid';
import { Heading } from '@/components/Heading/Heading';
import { Link } from '@/components/Link/Link';
import { LinkList, LinkListLink } from '@/components/LinkList/LinkList';
import { OrderedList, OrderedListItem } from '@/components/OrderedList/OrderedList';
import { Paragraph } from '@/components/Paragraph/Paragraph';

const contentSpan = 'all' as const;

const Home = () => {
return (
<div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kan dit een fragment zijn?

Suggested change
<div>
<>

<Grid paddingVertical="2x-large" gapVertical="2x-large">
<GridCell span={contentSpan}>
<Heading level={1}>NL Design System in Next.js</Heading>
</GridCell>

<GridCell span={contentSpan}>
<Heading level={2}>Purpose</Heading>
<Paragraph>
This project shows how you can playfully discover and use components from the{' '}
<Link href="https://nldesignsystem.nl">NL Design System</Link> in a Next.js application.
</Paragraph>
<Paragraph>
This page deliberately combines components from multiple implementations:{' '}
<code>@nl-design-system-candidate</code>, <code>@utrecht/component-library-react</code>, and{' '}
<code>@amsterdam/design-system-react</code>.
</Paragraph>
</GridCell>

<GridCell span={contentSpan}>
<Heading level={2}>Which component maturity should you use?</Heading>
<Paragraph>
The NL Design System groups every component by maturity through the{' '}
<Link href="https://nldesignsystem.nl/handboek/estafettemodel/">estafettemodel</Link> (relay model). It
ranges from a production-proven implementation to a concept with no clear implementation yet:
</Paragraph>
<OrderedList>
<OrderedListItem>
<Paragraph>
<strong>Hall of Fame</strong> used in production by at least two organizations, audited for
accessibility, and semantically versioned with a changelog. The safest choice.
</Paragraph>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
<strong>Candidate</strong> expected to reach Hall of Fame, but still gathering documentation and
feedback, so it can still change. This is what <code>@nl-design-system-candidate</code> offers.
</Paragraph>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
<strong>Community</strong> built by the community according to NL Design System guidelines and usable
with confidence, but without the stability guarantees of Candidate or Hall of Fame.
</Paragraph>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
<strong>Help wanted</strong> a documented need without an implementation yet, and a good opportunity to
contribute one.
</Paragraph>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
<strong>Discouraged</strong> flagged by user research or accessibility guidelines as something to avoid.
</Paragraph>
</OrderedListItem>
</OrderedList>
<Alert type="info">
<Paragraph>
Rule of thumb: always reach for the most mature (Hall of Fame) version of a component first. If it doesn't
fit your use case, check Candidate implementations, and only then look around the Community components —
just know these can have organisasion specific quirks and may still change.
</Paragraph>
</Alert>
</GridCell>

<GridCell span={contentSpan}>
<Heading level={2}>Getting started</Heading>
<Paragraph>Everything you need to start using the NL Design System in a React application:</Paragraph>
<OrderedList>
<OrderedListItem>
<Paragraph>
Choose an implementation. The NL Design System isn't a single library, so pick the one (or combination)
that fits your project, such as <code>@nl-design-system-candidate</code>,{' '}
<code>@utrecht/component-library-react</code>, or <code>@amsterdam/design-system-react</code>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>@utrecht/component-library-react</code>, or <code>@amsterdam/design-system-react</code>.
<Code>@utrecht/component-library-react</Code>, or <Code>@amsterdam/design-system-react</Code>.

Hier is ook een component voor

</Paragraph>
</OrderedListItem>
<OrderedListItem>
<Paragraph>Install the React component and its CSS package.</Paragraph>
<CodeBlock>
{'pnpm add @nl-design-system-candidate/heading-react @nl-design-system-candidate/heading-css'}
</CodeBlock>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
Import the component's CSS once, wherever you set up your application or with your component
implementation.
</Paragraph>
<CodeBlock>{"import '@nl-design-system-candidate/heading-css/heading.css';"}</CodeBlock>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
Load a set of design tokens and apply the matching theme class to your root element. This project loads{' '}
<code>@nl-design-system-unstable/start-design-tokens</code> and applies the <code>start-theme</code>{' '}
class in <code>app/layout.tsx</code>.
</Paragraph>
<CodeBlock>
{"import '@nl-design-system-unstable/start-design-tokens/dist/variables.css';\n\n" +
'<html lang="en" className="start-theme">'}
</CodeBlock>
</OrderedListItem>
<OrderedListItem>
<Paragraph>Import and render the component.</Paragraph>
<CodeBlock>
{"import { Heading } from '@nl-design-system-candidate/heading-react';\n\n" +
'const Example = () => <Heading level={1}>Hello world</Heading>;'}
</CodeBlock>
<Paragraph>
The React components can also be imported with CSS included but with the caveat that it can only be
client side rendered:
</Paragraph>
<CodeBlock>{"import { Link } from '@nl-design-system-candidate/link-react/css';"}</CodeBlock>
</OrderedListItem>
<OrderedListItem>
<Paragraph>
Repeat for every component you need, and browse{' '}
<Link href="https://nldesignsystem.nl/componenten/">nldesignsystem.nl/componenten/</Link> to discover
which components exist and in which implementations.
</Paragraph>
</OrderedListItem>
</OrderedList>
</GridCell>

<GridCell span={contentSpan}>
<Heading level={2}>How to use this project</Heading>
<Paragraph>
Each component used on this page follows the steps above and is wrapped in its own file under{' '}
<code>components/</code>, so you can see the install and import steps applied for real. Open a component in
that folder to see the pattern.
</Paragraph>
<Alert type="info">
<Paragraph>
Tip: start at <Link href="https://nldesignsystem.nl/componenten/">nldesignsystem.nl/componenten/</Link> to
discover which components are available and in which implementations, before building something yourself.
</Paragraph>
</Alert>
</GridCell>

<GridCell span={contentSpan}>
<Heading level={2}>Next steps</Heading>
<Paragraph>Want to continue? Here are two logical next steps:</Paragraph>
<LinkList>
<LinkListLink href="https://nldesignsystem.nl">
Explore nldesignsystem.nl — discover the broader ecosystem and more components
</LinkListLink>

<LinkListLink href="https://nl-design-system.github.io/example/">
View the Storybook for this project — a starting point for implementing your own design system
</LinkListLink>
</LinkList>
</GridCell>
</Grid>
</div>
);
};

export default Home;
2 changes: 2 additions & 0 deletions apps/next/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Alert } from '@utrecht/component-library-react';
import '@utrecht/alert-css/dist/index.css';
2 changes: 2 additions & 0 deletions apps/next/components/CodeBlock/CodeBlock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { CodeBlock } from '@nl-design-system-candidate/code-block-react';
import '@nl-design-system-candidate/code-block-css/code-block.css';
7 changes: 7 additions & 0 deletions apps/next/components/Grid/Grid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use client';

import { Grid as AmsterdamGrid } from '@amsterdam/design-system-react';
import '@amsterdam/design-system-css/dist/grid/grid.css';

export const Grid = AmsterdamGrid;

Check warning on line 6 in apps/next/components/Grid/Grid.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use `export…from` to re-export `Grid`.

See more on https://sonarcloud.io/project/issues?id=nl-design-system_example&issues=AZ-ydOGa6zMItUNx0kwW&open=AZ-ydOGa6zMItUNx0kwW&pullRequest=1012
export const GridCell = AmsterdamGrid.Cell;
2 changes: 2 additions & 0 deletions apps/next/components/Heading/Heading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Heading } from '@nl-design-system-candidate/heading-react';
import '@nl-design-system-candidate/heading-css/heading.css';
2 changes: 2 additions & 0 deletions apps/next/components/Link/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Link } from '@nl-design-system-candidate/link-react';
import '@nl-design-system-candidate/link-css/link.css';
8 changes: 8 additions & 0 deletions apps/next/components/LinkList/LinkList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use client';

import { LinkList as AmsterdamLinkList } from '@amsterdam/design-system-react';
import '@amsterdam/design-system-css/dist/icon/icon.css';
import '@amsterdam/design-system-css/dist/link-list/link-list.css';

export const LinkList = AmsterdamLinkList;

Check warning on line 7 in apps/next/components/LinkList/LinkList.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use `export…from` to re-export `LinkList`.

See more on https://sonarcloud.io/project/issues?id=nl-design-system_example&issues=AZ-ydOBc6zMItUNx0kwV&open=AZ-ydOBc6zMItUNx0kwV&pullRequest=1012
export const LinkListLink = AmsterdamLinkList.Link;
Loading