@kern-ux-annex/kern-react-kit
v2.27.0
Published
React-Umsetzung der Kern-UX Komponenten
Maintainers
Readme
@kern-ux-annex/kern-react-kit
React implementation of the KERN-UX components library with 37 components (30 core + 7 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 (38 total)
Core Components (30)
Base Components:
KernAccordion- Collapsible content sectionsKernAlert- Alerts and notificationsKernBadge- Labels and status indicatorsKernButton- Buttons with link functionalityKernCard- Card layoutsKernDialog- Modal dialogsKernDivider- Divider linesKernHeading- Headlines (h1-h6) with flexible sizingKernIcon- Icon displayKernLink- LinksKernList- Lists (ul/ol) with flexible contentKernLoader- 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:
KernColumn- Column layoutsKernContainer- Container elementsKernRow- Row layouts
Data Components:
KernDescriptionList- Description listsKernSummary- Summary sectionsKernTable- Data tablesKernTaskList- Task lists
Addon Components (7)
KernSidebar- Navigation sidebarKernToggleDarkMode- Dark mode toggleDialogProvider- Dialog context providerDialogContext- Dialog contextuseDialog- Dialog hookuseDialogSafe- Safe dialog hookEventEmitter- Event system
⚙️ 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
