@chayns-ui/core
v0.4.2
Published
Accessible React core components for chayns UI
Readme
@chayns-ui/core
Barrierefreie React-Core-Komponenten für chayns UI. ESM-only, ohne Business-Logik, ohne Laufzeit-CSS-Injektion. Komponenten- und Token-CSS werden ausdrücklich importiert, damit Tree-Shaking nur das Genutzte ins Bundle nimmt.
- Storybook (Live): https://tobitsoftware.github.io/chayns-ui/
- Repository & Mitwirken: https://github.com/TobitSoftware/chayns-ui
Installation
pnpm add @chayns-ui/core @chayns-ui/tokens reactreact >= 19.2 ist eine Peer Dependency. @chayns-ui/tokens liefert die
Design-Token-Basis.
Verwendung
import { Button, IconButton } from '@chayns-ui/core';
// Einmal pro App:
import '@chayns-ui/tokens/baseline.css';
import '@chayns-ui/tokens/patch.css';
// Pro genutzter Komponente:
import '@chayns-ui/core/button.css';
<Button icon="fa-floppy-disk" variant="primary">Speichern</Button>;
<IconButton aria-label="Optionen" icon="fa-ellipsis" variant="ghost" />;Enthaltene Komponenten
| Import | CSS-Export |
|---|---|
| Button, IconButton | @chayns-ui/core/button.css |
| Card | @chayns-ui/core/card.css |
| Avatar, AvatarGroup | @chayns-ui/core/avatar.css |
| List | @chayns-ui/core/list.css |
| TextField, TextArea, Checkbox, Switch, RadioGroup, SegmentedControl, MessageBox | their matching CSS export |
| Accordion, AccordionGroup | @chayns-ui/core/accordion.css |
| Popup, PopupList | @chayns-ui/core/popup.css |
| SplitButton | @chayns-ui/core/split-button.css |
Alternativ lädt @chayns-ui/core/styles.css das gebündelte CSS aller Komponenten.
ListItem wurde vor 1.0 durch List.Item ersetzt. Komponiere Zeilen mit
List.Item.Action, List.Item.Body, List.Item.Title und optionalen Slots.
Hinweise
Die Bibliothek lädt keine Fonts, injiziert kein CSS und kalibriert keine Accent-Farbe zur Laufzeit. Farb-, Dichte- und Motion-Eingaben kommen aus den Design Tokens der Anwendung.
