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

@gyldendal/kobber-base

Package Overview
Dependencies
Maintainers
0
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gyldendal/kobber-base

## πŸ› οΈ Usage

  • 0.3.64
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
240
decreased by-31.03%
Maintainers
0
Weekly downloads
Β 
Created
Source

Base

πŸ› οΈ Usage

Design tokens can be imported as json, css variables or sass variables:

import * as tokens from "~@gyldendal/kobber-base/themes/default/tokens";

export const Button = styled.button`
    background-color: ${tokens.component.button.color.background};
`;
@import "~@gyldendal/kobber-base/themes/default/tokens.css";

.button {
  background-color: var(--kobber-component-button-color-background);
}
@use "~@gyldendal/kobber-base/themes/default/tokens.scss" as tokens;

.button {
  background-color: tokens.$component-button-color-background;
}

Typography can be applied directly to HTML using CSS classes or by using composes in css modules:

<style>
  @import "~@gyldendal/kobber-base/themes/default/typography.css";
</style>

<h1 class="kobber-typography-heading-xl">Heading</h1>
.my-heading {
  composes: headingXxl from "~@gyldendal/kobber-base/themes/default/typography.module.css";
}

Also see the typography component from @gyldendal/kobber-components:

import { ThemeProvider, Typography } from "~@gyldendal/kobber-base/react";

<ThemeProvider variant="default">
    <Typography component="h1" variant="headingXxl" />
</TheThemeProviderme>

🧱 Token folder structure

/
β”œβ”€β”€ themes/
β”‚   β”œβ”€β”€ tokens.css
β”‚   β”œβ”€β”€ tokens.scss
β”‚   └── token.json
β”œβ”€β”€ tokens-from-figma/
β”‚   β”œβ”€β”€ index.ts
β”‚   └── tokens-YYYY-MM-DD.json
β”œβ”€β”€ build.ts
└── buildConfig.ts

Using style-dictionary to transform and format the tokens from Figma.

The files in ./themes are auto generated and should never be edited manually.

How to update tokens

FAQs

Package last updated on 17 Dec 2024

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