# KERN Components for Drupal

Drupal Single Directory Components (SDC) implementation of the [KERN UX Design System](https://www.kern-ux.de/).

## Requirements

- Drupal 10.x or 11.x
- PHP 8.3+
- Node.js (for building CSS assets)

## Installation

Install via Composer:

```bash
composer require drupal/kern_ux_canvas
```

Then enable the theme:

```bash
drush theme:enable kern_ux_canvas
drush config:set system.theme default kern_ux_canvas
```

## Build

See [BUILD.md](BUILD.md) for detailed build instructions.

Quick start:

```bash
npm install && npm run build
```

## Local Development

This project uses [DDEV](https://ddev.com/) with [ddev-drupal-contrib](https://github.com/ddev/ddev-drupal-contrib) for local development.

```bash
git clone https://git.drupalcode.org/project/kern_ux_canvas.git
cd kern_ux_canvas
ddev start
ddev poser
ddev drush site:install --account-name=admin --account-pass=admin -y
ddev drush theme:enable kern_ux_canvas
ddev drush config:set system.theme default kern_ux_canvas -y
ddev npm install && ddev npm run build
ddev launch
```

Site URL: https://kern-ux.ddev.site

### Storybook

```bash
npm run storybook
```

Access at: http://localhost:6006

## Resources

- [KERN UX Design System](https://www.kern-ux.de/)
- [KERN-UX Native Package](https://www.npmjs.com/package/@kern-ux/native)
- [Drupal SDC Documentation](https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components)
- [DDEV Documentation](https://ddev.readthedocs.io/)
- [ddev-drupal-contrib](https://github.com/ddev/ddev-drupal-contrib)

## License

GPL-2.0-or-later
