npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@db-ux/core-components

v4.2.3

Published

General technical components (styling, fonts and icons) out of DB UX Design System (Version 3)

Downloads

5,525

Readme

@db-ux/core-components

Apache 2.0 license badge code style: prettier Conventional Commits PRs Welcome

A library containing all styles for components of DB UX Design System v3.

Note Furthermore we currently support these additional JavaScript frameworks, with more coming soon:

Please take a look at your desired framework to retrieve more information.

For additional information besides the frameworks see our Getting started.


If you just need the styling follow this:

Package Relationship

✅ Do I need foundations if I install components?

No! The @db-ux/core-components package automatically includes all the foundations (@db-ux/core-foundations) you need. You only need to install one package:

  • Use @db-ux/core-components - If you want to use UI components (buttons, inputs, etc.)
  • Use @db-ux/core-foundations - If you only need design tokens, colors, spacing, fonts, and assets without any component styles

Install

npm i @db-ux/core-components

Note: This automatically includes @db-ux/core-foundations as a dependency, so you don't need to install it separately.

Styling Dependencies

Import the styles in scss or css. Based on your technology the file names could be different.

  • relative: asset path point to ../assets
  • webpack: asset path point to ~@db-ux/core-foundations/assets
  • rollup: asset path point to @db-ux/core-foundations/assets

Important: These bundled files automatically include all dependencies from foundations (design tokens, colors, fonts, etc.) and all components - everything you need in one import!

SCSS

// index.scss
@forward "@db-ux/core-components/build/styles/rollup";

CSS

Within HTML files directly:

<!-- index.html //-->
<link rel="stylesheet" href="/styles/rollup.css" />

Or within your JavaScript files, with the related bundler as a prefix (in this case rollup and equivalents like Vite):

// main.js
import "@db-ux/core-components/build/styles/rollup.css";

DB Theme

In case that you're building a website or application for Deutsche Bahn, you'll additionally have to install the DB Theme via the @db-ux/db-theme node package (even also available as an inner source node package, as described within that packages README).

Optimize dependencies

If you only need some of the components or some features from @db-ux/core-foundations, you shouldn't include the bundled file. In the case you want to include only some components, and you could do it like this:

/* The theme contains all props required for components like spacings, colors, ... */
@import "@db-ux/core-foundations/build/styles/defaults/default-theme.css";
/* The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) */
@import "@db-ux/core-foundations/build/styles/fonts/rollup.css";
/* The required styles will normalize css and add focus and default font to body */
@import "@db-ux/core-foundations/build/styles/defaults/default-required.css";
/* The default setting for :root, adds a color space (neutral-bg-basic-level-1) and a density (regular). */
@import "@db-ux/core-foundations/build/styles/defaults/default-root.css";

/* Optional: Add animations / transitions for components */
@import "@db-ux/core-components/build/styles/component-animations.css";

/* Optional: Add data-icon/data-icon-trailing to global attributes to enable icons for components */
@import "@db-ux/core-foundations/build/styles/icons/rollup.css";

/* Optional: Add components */
@import "@db-ux/core-components/build/components/button/button.css";
@import "@db-ux/core-components/build/components/input/input.css";

Deutsche Bahn brand

As we'd like to perfectly support our users and customers on their digital journey, the usage of Deutsche Bahn brand and trademarks are bound of clear guidelines and restrictions even if being used with the code that we're providing with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UX Design System products free to use and release it under the Apache 2.0 license. Please have a look at our brand portal at https://marketingportal.extranet.deutschebahn.com/ for any further questions and whom to contact on any brand issues.

For any usage outside of Deutsche Bahn websites and applications you aren't allowed to use any Deutsche Bahn brand and design assets as well as protected characteristics and trademarks, that for not including the DB Theme.

Contributions

Contributions are very welcome, please refer to the contribution guide.

Code of conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone – have a look at our Contributor Covenant Code of Conduct.

License

This project is licensed under Apache-2.0.