0.3.11 • Published 1 day ago

@gyldendal/kobber-components v0.3.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

Component library

Components can be used as react components or as web components. TypeScript definitions are included.

Installation

Run one of the following commands to add @gyldendal/kobber-components to your project:

npm install @gyldendal/kobber-components
yarn add @gyldendal/kobber-components

You will also need to install react and react-dom

Inter font

The Inter variable font is used by default. It can be installed separately from fontsource with one of these commands:

npm install @fontsource-variable/inter
yarn add @fontsource-variable/inter

And then imported in your project:

import '@fontsource-variable/inter';

Usage

Components can be imported as react components or as web components.

As a react component:

import { ProgressBar } from "@gyldendal/kobber-components/react";
const App = () => <ProgressBar />;

As a custom element:

<script>import "@gyldendal/kobber-components/web-components";</script>
<kobber-progress-bar />

As a web component:

import { ProgressBar } from "@gyldendal/kobber-components/web-components";
const progressBar = new ProgressBar();
document.body.appendChild(progressBar);

CSS

CSS can be imported in JavaScript if supported by your bundler:

import "@gyldendal/kobber-base/css/components.css";

kobber-components assumes that box-sizing is set to border-box:

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

We recommend using normalize.css or something similar to normalize browser styles.

0.3.11

1 day ago

0.3.10

12 days ago

0.3.9

26 days ago

0.3.8

27 days ago

0.3.7

1 month ago

0.3.6

2 months ago

0.3.5

2 months ago

0.3.3

2 months ago

0.3.0

5 months ago

0.3.2

5 months ago

0.3.1

5 months ago

0.2.0

5 months ago

0.1.0

5 months ago

0.0.1

6 months ago