Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@db-ui/foundations

Package Overview
Dependencies
Maintainers
3
Versions
170
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@db-ui/foundations

Provides basic tokens and assets based on the DB Design System.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
166
decreased by-25.56%
Maintainers
3
Weekly downloads
 
Created
Source

@db-ui/foundations

A library containing all tokens of DB UX System.

We currently support:

Install

npm i @db-ui/foundations

Usage

CSS

// main.ts / main.js
import "@db-ui/foundations/build/db-ui-foundations.css";
// optional: to use classes like e.g. db-ui-bg-success
import "@db-ui/foundations/build/color-classes.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" as *;
@use "@db-ui/foundations/build/scss/icon/icons" as *;
@use "@db-ui/foundations/build/db-ui-foundations" as *;
// optional: to use db-ui-bg-success
@import "@db-ui/foundations/build/color-classes" as *;
// optional: to use use $db-spacing-fixed-md
@use "@db-ui/foundations/build/scss/variables.global" as *;

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

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc