Skip to content

feat: add nextjs package - #1012

Open
eelcobosklopper wants to merge 30 commits into
mainfrom
feat/setup-nextjs-package
Open

feat: add nextjs package#1012
eelcobosklopper wants to merge 30 commits into
mainfrom
feat/setup-nextjs-package

Conversation

@eelcobosklopper

Copy link
Copy Markdown

Issue: https://github.com/nl-design-system/kernteam/issues/2070

Add Next.js package.
Made some changes in the base of the project to handle nextjs files.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example Error Error Aug 6, 2026 8:39am

Request Review

Comment thread packages/nextjs/app/theme.css Outdated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

In een aparte branch heb ik deze file vervangen met @nl-design-system-community/ma-design-tokens/dist/variables.css.
Alsnog lijkt het mij wel fijner als voorbeeld om alleen een custom theme file te hebben met de alleen benodigde Design Tokens. @Robbert wat denk jij?

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.

Ik stel voor om hier in eerste instantie het start-thema te importeren, zonder duplicatie

Dan kan later de packages/design-tokens/ aangepast worden om gebaseerd te worden op het start thema, en dan kun je locale design tokens gebruiken uit je workspace.

@@ -0,0 +1,2 @@
export { Button } from '@nl-design-system-candidate/button-react';

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Mijn IDE (VScode) doet geen autocomplete omdat Typescript deze exports niet kan indexeren. Als ik de Button als een const exporteer dan pakt hij hem wel op maar Sonar vindt dit weer niet leuk.
Hebben jullie hier een oplossing voor?

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.

Zou je een issue willen aanmaken bij de candidate repo voor matige developer experience met TypeScript autocomplete? Als jij een oplossing hebt hoor ik het graag, ik denk dat dit van jou uit zou kunnen komen.

@eelcobosklopper eelcobosklopper Jul 30, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Het is niet een candidate repo issue maar hoe het component hier wordt ge-ïmporteerd en exporteerd. Ik loop tegen hetzelfde aan in de documentatie repo voor bijvoorbeeld packages/website/src/components/button/button.tsx waar de button van Utrecht gebruikt wordt.

Het is fijn om dit soort import/export component files te hebben zodat je als developer 1 centrale plek hebt voor je Button implementie. Dan is switchen tussen een community button of een candidate button minder gedoe.

Ik heb alleen nog geen betere manier gevonden dan dit te doen:

import { Button as ButtonReact } from '@nl-design-system-candidate/button-react';
import '@nl-design-system-candidate/button-css/button.css';

export const Button = ButtonReact;

Maar ik kan niet geloven dat anderen hier geen last van hebben dus ik ben heel benieuwd hoe zij dit hebben opgelost 😅
Ik gebruik VScode, misschien ligt het daar aan?

Comment thread packages/nextjs/package.json Outdated
Comment thread packages/nextjs/app/globals.css Outdated
Comment thread apps/next/app/layout.tsx Outdated
Comment thread packages/nextjs/package.json Outdated
richadr
richadr previously approved these changes Jul 27, 2026
Co-authored-by: Richard van Heuven van Staereling <richard@vhvs.nl>
@eelcobosklopper

Copy link
Copy Markdown
Author

@Robbert de package voor het start-thema was even zoeken. Uiteindelijk handmatig gezocht op npmjs.org op @nl-design-system-unstable. Is het handig om hier een referentie van op https://nldesignsystem.nl/handboek/huisstijl/themas/start-thema/ te zetten?

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

Comment thread apps/next/app/layout.tsx Outdated

<GridCell span={footerLinksSpan} start={footerLinksStart}>
<LinkList>
<LinkListLink color="inverse" href="https://nldesignsystem.nl/community/sluit-je-aan/">

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.

Zou het ook mogelijk zijn om de Tabler icon te gebruiken ipv een Amsterdam chevron?


<GridCell span={footerLinksSpan} start={footerLinksStart}>
<LinkList>
<LinkListLink color="inverse" href="https://nldesignsystem.nl/community/sluit-je-aan/">

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.

Op gegeven moment moet het ook mogelijk zijn om inverse niet hardcoded in de template te zetten, zou je dit als tech debt willen bijhouden? Misschien zijn er andere componenten in de community waarmee het zonder color="inverse" kan.

Comment thread apps/next/package.json
Comment thread apps/next/package.json Outdated
@@ -0,0 +1,62 @@
{
"name": "@example/nextjs",

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
"name": "@example/nextjs",
"name": "@example/next",

Ik stel voor om de packages/xxx/ en @example/xxx

Comment thread apps/next/app/layout.tsx
}>) {
return (
<html lang="en" dir="ltr" className="ma-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

Comment thread apps/next/app/layout.tsx
</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.

Comment thread apps/next/app/page.tsx

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>
<>

Comment thread packages/nextjs/app/page.tsx Outdated
<OrderedList>
<OrderedListItem>
<Paragraph>
<strong>Hall of Fame</strong> — used in production by at least two organizations, audited for

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
<strong>Hall of Fame</strong> used in production by at least two organizations, audited for
<b>Hall of Fame</b> used in production by at least two organizations, audited for

Comment thread apps/next/app/page.tsx
<Paragraph>
Choose an implementation. The NL Design System isn&apos;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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants