0.1.4 • Published 8 days ago

@db-ui/foundations v0.1.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 days ago

@db-ui/foundations

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

A library containing all tokens (colors, icons, variables) of DB UX Design System (technical components).

We currently support:

Install

npm i @db-ui/foundations

Usage

The defaults for db-ui-foundations.css are:

CSS

Default assets path for db-ui-foundations.css is ../assets. Make sure to copy all used resources like icons and fonts into your public folder before build.

// main.ts / main.js
import "@db-ui/foundations/build/css/db-ui-foundations.css";
// optional: to use classes like e.g. db-ui-bg-success
import "@db-ui/foundations/build/css/colors/classes/all.css";
.my-container {
	padding: var(--db-spacing-fixed-md);
}
<div class="db-ui-regular db-ui-bg-success my-container"></div>

SCSS

Based on your technology/setup you need to change the paths of the assets folder:

  • Default: points to ../assets
  • Webpack: points to ~@db-ui/foundations/assets
  • Rollup: points to @db-ui/foundations/assets
// index.scss
@use "@db-ui/foundations/build/scss/rollup.assets-paths";
@use "@db-ui/foundations/build/scss/icons";
@use "@db-ui/foundations/build/scss/db-ui-foundations";
// optional: to use db-ui-bg-success
@import "@db-ui/foundations/build/scss/colors/classes/all";
// optional: to use use $db-spacing-fixed-md
@use "@db-ui/foundations/build/scss/variables";

.my-container {
	padding: $db-spacing-fixed-md;
}
<div class="db-ui-regular db-ui-bg-success my-container"></div>

Tailwind

//tailwind.config.cjs

const tokens = require("@db-ui/foundations/build/tailwind/tailwind-tokens.json");

module.exports = {
	content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"],
	plugins: [],
	theme: {
		screens: tokens.screens,
		spacing: tokens.spacing,
		boxShadow: tokens.elevation,
		gap: ({ theme }) => ({
			...theme("spacing")
		}),
		space: ({ theme }) => ({
			...theme("spacing")
		})
	}
};
<div class="p-fix-md"></div>

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 when being used with the code that we're provide with this product; Deutsche Bahn fully reserves all rights regarding the Deutsche Bahn brand, even though that we're providing the code of DB UI 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.

You must remove or replace any Deutsche Bahn brand and design assets as well as protected characteristics and trademarks. We're even also planning to provide a neutral theme that would make it much easier for you to use our product without the trademarks by Deutsche Bahn.

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.

0.1.4

8 days ago

0.1.3

19 days ago

0.1.2

24 days ago

0.1.1

28 days ago

0.1.0

1 month ago

0.0.72

1 month ago

0.0.71

1 month ago

0.0.70

1 month ago

0.0.69

2 months ago

0.0.68

2 months ago

0.0.67

3 months ago

0.0.66

3 months ago

0.0.65

3 months ago

0.0.64

4 months ago

0.0.62

4 months ago

0.0.63

4 months ago

0.0.61

6 months ago

0.0.61-1-014b763

6 months ago

0.0.41

9 months ago

0.0.42

9 months ago

0.0.43

9 months ago

0.0.44

9 months ago

0.0.46

9 months ago

0.0.47

9 months ago

0.0.37

9 months ago

0.0.38

9 months ago

0.0.39

9 months ago

0.0.40-54a6900

9 months ago

0.0.30

10 months ago

0.0.31

9 months ago

0.0.32

9 months ago

0.0.33

9 months ago

0.0.34

9 months ago

0.0.36

9 months ago

0.0.59-2-a03ea50

6 months ago

0.0.21-6aa99a9

11 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.19-4c8ac43

11 months ago

0.0.22

10 months ago

0.0.23

10 months ago

0.0.24

10 months ago

0.0.25

10 months ago

0.0.60

6 months ago

0.0.59-1-cbb3358

6 months ago

0.0.59

6 months ago

0.0.17

11 months ago

0.0.18

11 months ago

0.0.51

8 months ago

0.0.52

8 months ago

0.0.53

8 months ago

0.0.54

8 months ago

0.0.55

8 months ago

0.0.56

7 months ago

0.0.57

7 months ago

0.0.58

7 months ago

0.0.59-2-048ac21

6 months ago

0.0.50

8 months ago

0.0.48

9 months ago

0.0.49

8 months ago

0.0.16

11 months ago

0.0.15-ba0dea2

11 months ago

0.0.14-2-02d50cb

11 months ago

0.0.14-c0e7d04

11 months ago

0.0.10

1 year ago

0.0.11

12 months ago

0.0.12

11 months ago

0.0.13

11 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.5

1 year ago

0.0.6

1 year ago

0.0.0-0-b51234c

1 year ago

0.0.0-1-2f184b5

1 year ago

0.0.1

1 year ago

0.0.3

1 year ago

0.0.4

1 year ago

0.0.0-2-487b57b

1 year ago

0.0.0-2-95c1224

1 year ago

0.0.0-0-995340e

1 year ago

0.0.0-0-28f97dd

1 year ago

0.0.0-0-0ca62c6

1 year ago

0.0.0-0-08d0a31

1 year ago

0.0.0-0-502d70b

1 year ago

0.0.0-0-4e25638

1 year ago