@kern-ux-annex/kern-react-kit
v2.40.0
Published
React-Umsetzung der Kern-UX Komponenten
Readme
@kern-ux-annex/kern-react-kit
React implementation of the KERN-UX components library with 56 components (42 core + 14 addons), full TypeScript support, and comprehensive documentation.
⚡ Quick Start
npm install @kern-ux-annex/kern-react-kitimport { KernButton, KernCard, KernAlert } from '@kern-ux-annex/kern-react-kit';
function App() {
return (
<KernCard
title="Welcome to KERN"
body={
<>
<KernAlert status="success">Setup completed!</KernAlert>
<KernButton
text="Visit KERN"
variant="primary"
href="https://www.kern-ux.de"
target="_blank"
/>
</>
}
/>
);
}📖 Interactive Documentation
Explore all components with live examples: Storybook Documentation
📦 Available Components (56 total)
Core Components (42)
Base Components:
KernAlert- Alerts and notificationsKernBadge- Labels and status indicatorsKernButton- Buttons with link functionalityKernCard- Card layoutsKernDivider- Divider linesKernHeading- Headlines (h1-h6) with flexible sizingKernIcon- Icon displayKernLink- LinksKernLoader- Loading animationsKernProgress- Progress barsKernSpace- Consistent spacing utilityKernText- Text display with semantic types
Form Components:
KernCheckbox- CheckboxesKernFieldset- Form field groupsKernForm- Form containersKernInput- Text input fieldsKernInputDate- Date input fieldsKernRadio- Radio buttonsKernRadioGroup- Radio button groupsKernSelect- Select dropdownsKernTextarea- Multi-line text inputs
Layout Components:
KernAccordion- Collapsible content sectionsKernColumn- Column layoutsKernContainer- Container elementsKernKopfzeile- A KopfzeileKernRow- Row layouts
Data Components:
KernDescriptionList- Description listsKernList- List (ordered and unordered)KernSummary- Summary sectionsKernSummaryGroup- Group of summary sectionsKernTable- Data tablesKernTaskList- Task listsKernTaskListGroup- Group of task lists
Dialog-Komponenten:
KernDialog- Modaler DialogKernDialogTrigger- Der Button, der den modalen Dialog öffnetKernDialogModal- Umfasst den modalen DialogKernDialogHeader- Kopfbereich des modalen DialogsKernDialogBody- Contentbereich des modalen DialogsKernDialogFooter- Beinhaltet die Buttons eines modalen DialogsKernDialogFooterButton- Ein Button fürKernDialogFooterKernDialogContext- Dialog-KontextuseDialog- Dialog-Hook
Addon Components (14)
Allgemeine Komponenten:
KernSidebar- Navigations-SidebarKernToggleDarkMode- Dark Mode ToggleEventEmitter- Event-System
Menu/Menubar-Komponenten:
KernMenubar- MenubarKernSubMenu- Submenu für die MenubarKernMenu- Menu, kann dem Menubutton Pattern folgendKernMenuitem- Menuitem für einzelne Einträge in der Menubar oder dem SubMenu
Tabs-Komponenten:
KernTabs- TabsKernTabList- Tab-List als Wrapper für einen oder mehrere TabsKernTab- TabKernTabPanels- Tab-Panels als Wrapper für die InhalteKernTabPanel- Tab-Panel für InhalteKernTabsContext- Tabs-KontextuseTabs- Tabs-Hook
⚙️ Features
- Full TypeScript Support: Complete type definitions with JSDoc documentation
- React 18 & 19 Compatible: Supports both React versions
- Button Link Functionality: KernButton supports both button and link behavior
- Semantic Typography: Flexible heading levels and text types
- Accessibility: WCAG-compliant components
- Modern Builds: ES modules and CommonJS support
- Zero Dependencies: Only peer dependencies on React
🚀 TypeScript Support
This package provides comprehensive TypeScript support:
import type { ButtonProps, HeadingProps } from '@kern-ux-annex/kern-react-kit';
// Full IntelliSense support for all component properties
const button: ButtonProps = {
text: "Submit",
variant: "primary", // Autocomplete: primary | secondary | tertiary
type: "submit" // Autocomplete: button | submit | reset
};🎨 CSS Dependencies
Include the required CSS in your project:
import "@kern-ux/native/dist/kern.min.css";
import "@kern-ux/native/dist/fonts/fira-sans.css";🔧 Peer Dependencies
- React: ^18.0.0 || ^19.0.0
- React DOM: ^18.0.0 || ^19.0.0
📄 License
EUPL-1.2
🤝 Contributing
This package is part of the KERN-UX community project. For more information, visit: https://gitlab.opencode.de/kern-ux/community/kern-react-kit
