2.1.0 • Published 22 days ago

@public-ui/theme-default v2.1.0

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
22 days ago

Public UI - Default-Theme

This is the default theme for the Public UI web component library. You can customize this theme by using css variables or by creating a new theme.

Integration in React

import { register } from '@public-ui/components';
import { defineCustomElements } from '@public-ui/components/dist/loader';
import { DEFAULT } from '@public-ui/theme-default';

register(DEFAULT, defineCustomElements).then(() => {
	ReactDOM.createRoot(document.getElementById('root')!).render(
		<React.StrictMode>
			<App />
		</React.StrictMode>,
	);
});

Full documentation

👉 https://public-ui.github.io

Usage (DE)

Das Default-Theme ist ein Token-Based Theme, das mit minimalen Anpassungen sofort verwendet werden kann. Es bringt bereits alle notwendigen Stylings mit und kann über Design Tokens, in Form von CSS Custom Properties an das eigene Design angepasst werden.

Variablen

VariableStandard-WertBedeutung
--kolibri-border-radius5pxBorder-Radius für abgerundete Elemente
--kolibri-font-familyBundesSans Web, Calibri, Verdana, Arial, Helvetica, sans-serifAllgemeine Schriftart
--kolibri-font-size16pxAllgemeine Schriftgröße
--kolibri-spacing0.25remAllgemeiner Abstand zwischen Elementen
--kolibri-border-width1pxAllgemeine Rahmen-Breite
--kolibri-color-primary#004b76Primärfarbe
--kolibri-color-primary-variant#0077b6Alternative Variante der Primärfarbe
--kolibri-color-danger#c0003cFarbe für Fehlermeldungen und gefährliche Aktionen
--kolibri-color-warning#c44931Farbe für Warnungen
--kolibri-color-success#005c45Farbe für Erfolgsmeldungen
--kolibri-color-subtle#576164Farbe für feine Akzente wie z.B. Rahmen
--kolibri-color-light#ffffffHelle Farbe für z.B. Hintergründe
--kolibri-color-text#202020Textfarbe
--kolibri-color-mute#f2f3f4Farbe für deaktivierte Elemente
--kolibri-color-mute-variant#bec5c9Alternative Farbe für deaktivierte Elemente

Verwendung

Theme importieren und registrieren:

import { register } from '@public-ui/components';
import { defineCustomElements } from '@public-ui/components/dist/loader';
import { DEFAULT } from '@public-ui/theme-default';

register(DEFAULT, defineCustomElements);

Für mehr Details und weitere Optionen siehe Erste Schritte.

Um die Design Tokens anzupassen, reicht ein einfaches Stylesheet, das die gewünschten Custom Properties überschreibt. Es ist dabei nicht notwendig, alle Properties zu setzen, sondern nur solche, die auch überschrieben werden sollen. Beispiel:

:root {
	--kolibri-border-radius: 3px;
	--kolibri-font-size: 18px;
	--kolibri-spacing: 0.3rem;
	--kolibri-color-primary: #cc006e;
	--kolibri-color-primary-variant: #ff64b9;
}
2.1.0

22 days ago

1.7.21

24 days ago

2.0.15

24 days ago

2.0.14

1 month ago

1.7.20

1 month ago

2.0.13

1 month ago

1.7.19

2 months ago

2.0.12-rc.0

2 months ago

2.0.12

2 months ago

1.7.19-rc.0

2 months ago

1.7.18

2 months ago

2.0.11

2 months ago

1.7.17

2 months ago

2.0.10

2 months ago

1.7.16

2 months ago

2.0.9

2 months ago

1.7.15

2 months ago

2.0.8

3 months ago

1.7.14

3 months ago

2.0.7

3 months ago

1.7.13

3 months ago

1.7.12

3 months ago

2.0.6

3 months ago

2.0.5

3 months ago

1.7.11

3 months ago

2.0.4

4 months ago

1.7.10

4 months ago

1.7.10-rc.0

4 months ago

2.0.4-rc.0

4 months ago

2.0.3

5 months ago

1.7.9

5 months ago

2.0.2

5 months ago

1.7.8

5 months ago

2.0.1

5 months ago

1.7.7

5 months ago

2.0.0-rc.13

6 months ago

2.0.0

5 months ago

2.0.0-rc.12

6 months ago

1.7.6

6 months ago

2.0.0-rc.11

6 months ago

1.7.6-rc.2

6 months ago

2.0.0-rc.10

6 months ago

1.7.6-rc.1

6 months ago

1.7.6-rc.0

6 months ago

2.0.0-rc.9

6 months ago

1.7.5

7 months ago

2.0.0-rc.8

7 months ago

2.0.0-rc.7

7 months ago

2.0.0-rc.6

7 months ago

1.7.4

7 months ago

2.0.0-rc.5

7 months ago

2.0.0-rc.4

7 months ago

2.0.0-rc.3

7 months ago

2.0.0-rc.2

7 months ago

2.0.0-rc.1

7 months ago

1.7.3

7 months ago

2.0.0-rc.0

7 months ago

1.7.2

7 months ago

1.7.2-rc.0

7 months ago