
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@dbcdk/react-components
Advanced tools
Reusable React components for DBC projects.
This library provides a shared, themeable component system used across DBC’s internal (and selected external) applications. It is designed to promote consistency, speed up development, and improve overall quality and accessibility.
The goals of this component library are:
Consistency
Provide a unified look and feel across DBC’s digital products, especially internal tools.
Development speed
Reduce development and maintenance time by reusing well-tested components instead of rebuilding UI from scratch.
Quality & accessibility
Components are reviewed and built according to best practices, with accessibility and robustness in mind, ensuring a strong baseline quality.
Reduced third-party dependency
Increase digital independence by building and sharing our own components across the organisation, reducing reliance on external NPM packages.
npm install @dbcdk/react-components
Important: The component library requires global styles to be imported once in your application.
import '@dbcdk/react-components/styles.css'
<link> in your root layout (Next.js example)The library uses theme CSS files that are dynamically loaded via a <link> tag in <head>.
You must use the exported LINK_ID so the useTheme() hook can update the active theme at runtime.
import { ReactNode } from 'react'
import { cookies } from 'next/headers'
import { LINK_ID } from '@dbcdk/react-components'
import '@dbcdk/react-components/styles.css'
export default async function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
const cookieStore = await cookies()
const themeId = cookieStore.get('dbc_theme')?.value || 'light'
return (
<html lang="da">
<head>
<link id={LINK_ID} rel="stylesheet" href={`/themes/${themeId}.css`} />
</head>
<body>{children}</body>
</html>
)
}
Theme files are expected to be served from
/themes/<theme>.css.
Example using useTheme():
'use client'
import { AppHeader, Button, useTheme } from '@dbcdk/react-components'
import { Moon, Sun } from 'lucide-react'
export default function Header() {
const { theme, switchTheme } = useTheme()
return (
<AppHeader>
<Button variant="outlined" onClick={() => switchTheme(theme === 'light' ? 'dark' : 'light')}>
{theme === 'light' ? <Moon /> : <Sun />}
</Button>
</AppHeader>
)
}
The hook updates the <link> tag automatically and persists the selected theme.
Storybook is the primary documentation and exploration tool for this library.
npm run storybook
Storybook runs on http://localhost:6006.
Use the 🎨 theme selector in the Storybook toolbar to switch between available themes (e.g. light and dark).
All components are styled using CSS variables defined in the theme files.
Accessibility is a first-class concern in this library.
We aim to ensure that components:
Storybook includes the a11y addon to help identify issues during development.
See CONTRIBUTING.md for detailed guidelines on:
ISC
FAQs
Reusable React components for DBC projects
We found that @dbcdk/react-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.