Demo: Diese Website ist eine Demo für fluid – keine offizielle Website von REDAXO. Operated by KLXM Crossmedia

fluid

Building your own kit

What a kit is, when you need one – and how it comes together step by step.

What is a kit?

In development: REDAXO 6 is being built in the 6.x branch of redaxo/core. The examples reflect the state of November 2026 – names and details may still change before the release.

A kit defines how the whole website looks: the page frame with header, menu and footer, the CSS, the output of every block (views) and what the design bar offers. It also defines which layouts and backgrounds a block provides.

The content belongs to no kit. A “Call to action” block stays a slice with the same fields – the kit only decides how it looks. That is why the kit can be switched under Website → Kit without touching a single page.

Every kit inherits from another one (default: fluid) and brings only what it changes. So all blocks are always there, and updates of fluid reach your own kit, too. The bundled kit “NativeCSS” is built this way: its own page frame and its own views for some blocks, everything else from fluid.

Weighing up

Do you need a kit?

Three ways to shape the website – from the simplest to the most thorough.

  • Design bar

    Colors, fonts, shapes, header and footer – right on the page, without code. Enough for most websites.

  • Custom kit

    Different markup and CSS for the whole website, own layouts and backgrounds – inherited from fluid.

1. Create the kit

The command creates the kit in the project. With --view it copies views of the parent kit for you to adapt, with --template the page frame.

Terminal
php bin/console fluid:kit:create nature --label="Nature" --view=cta

# legt an:
#   src/Kit/Nature/NatureKit.php       Anmeldung des Kits
#   src/Kit/Nature/kit.php             Definition – nur, was anders ist
#   src/Kit/Nature/assets/css/kit.css  eigenes CSS
#   src/Kit/Nature/views/cta.php       Kopie der View „Handlungsaufruf“ (--view)

2. The kit class

The attribute #[AsKit] registers the kit – key, name and parent kit. The class itself stays empty.

src/Kit/Nature/NatureKit.php PHP
<?php

namespace Project\Kit\Nature;

use Klxm\Fluid\AsKit;
use Klxm\Fluid\Kit;

/**
 * Kit „Nature“ – erbt von „Fluid“. Dateien in diesem Ordner ersetzen die des Eltern-Kits:
 * kit.php (Definition, z. B. Darstellungen für Blöcke), views/{typ}.php, template.view.php, functions.php, assets/.
 */
#[AsKit('nature', 'Nature', parent: 'fluid')]
final class NatureKit extends Kit {}

3. The definition: only what differs

$parent is the definition of the parent kit. backgrounds and assets are extended per key, css is appended; blocks is laid over the block classes (layouts are added). Everything else is replaced.

src/Kit/Nature/kit.php PHP
<?php

/*
 * Kit „Nature“: nur, was vom Eltern-Kit „fluid“ abweicht ($parent ist dessen Definition).
 */

return [
    'label' => 'Nature',
    // eigenes CSS für jede Seite – nach dem CSS von „fluid“
    'css' => ['css/kit.css'],
    // zusätzlicher Hintergrund für alle Blöcke (Klasse bg-sand)
    'backgrounds' => ['sand' => 'Sand'],
    // Handlungsaufruf: zusätzliche Variante „Mit Blatt“ – Felder und alles andere aus der Blockklasse
    'blocks' => [
        'cta' => ['variants' => ['leaf' => 'Mit Blatt']],
    ],
];

4. Own CSS

Loaded after the CSS of fluid. The variables of the design bar (--f-…) still apply – build on them instead of hard-coding colors.

src/Kit/Nature/assets/css/kit.css CSS
/* Hintergrund „Sand“: aus Akzent und Hintergrund gemischt – passt so zu hell und dunkel */
.bg-sand {
    --f-sec-bg: color-mix(in srgb, #c8a96a 22%, var(--f-bg));
    --f-card: var(--f-bg);
}

/* Handlungsaufruf „Mit Blatt“ */
.cta__leaf {
    color: var(--f-a);
    font-size: 2.5rem;
}

5. Replacing a view

A file views/{type}.php replaces the output of that block. $b is the block, $d its data – as with a custom block.

src/Kit/Nature/views/cta.php PHP
<?php
/** Handlungsaufruf im Kit „Nature“ – wie in „fluid“, dazu die Variante „Mit Blatt“ (Band mit Blatt). @var \Klxm\Fluid\Block $b  @var array $d */
$leaf = 'leaf' === $b->variant();
$v = $leaf ? 'band' : (in_array($b->variant(), ['band', 'box', 'split', 'big'], true) ? $b->variant() : 'band');
$pic = $v === 'split' ? fluid_image($d['image'] ?? null, '(min-width: 1080px) 560px, 100vw', '4:3', 'cta__media') : '';
?>
<div class="wrap">
  <div class="cta cta--<?= e($v) ?><?= $pic !== '' ? ' cta--media' : '' ?>">
    <div class="cta__main">
    <div class="cta__text">
      <?php if ($leaf): ?><?= icon('leaf', ['class' => 'cta__leaf']) ?><?php endif; ?>
      <?php if (trim((string) ($d['eyebrow'] ?? '')) !== ''): ?><p class="eyebrow"<?= $b->edit('eyebrow') ?>><?= e($d['eyebrow']) ?></p><?php endif; ?>
      <h2 id="<?= e($b->titleId()) ?>" class="<?= $v === 'big' ? 'cta__big' : 'h2' ?> cta__title"<?= $b->edit('title') ?>><?= fluid_title((string) $d['title']) ?></h2>
      <?php if ($d['text'] !== '' || is_editing()): ?><p class="cta__lead"<?= $b->edit('text') ?>><?= nl2br(e($d['text']), false) ?></p><?php endif; ?>
    </div>
    <?= fluid_buttons($b, 'cta__actions') ?>
    </div>
    <?= $pic ?>
  </div>
</div>
Handlungsaufruf im Beispiel-Kit „Nature“ mit sandfarbenem Hintergrund und Blatt über der Dachzeile

Result

The call to action in the “Nature” kit

The background “Sand” and the layout “With leaf” can now be chosen in the sidebar. All other blocks, the design bar and the page frame come unchanged from fluid.

  • Chosen under Website → Kit
  • Content stays when switching
  • Every kit keeps its own design values

What a kit can replace

  • views/{type}.php – the output of a block type
  • template.view.php – the page frame with header, menu and footer
  • assets/… – single files, e.g. assets/css/b-cards.css instead of the one from fluid
  • functions.php – additional helper functions for views
  • kit.php – the definition: backgrounds, design bar, additional layouts of blocks (their fields live in the block classes)

Design values are stored per kit; as long as a new kit has none of its own, it takes those of its parent kit. fluid publishes assets on console migrate – so on the server, deploy the kit folder and run migrate. The extension point FLUID_KIT chooses a kit per domain.

As a Composer package for several projects

A kit for several projects is an AddOn: REDAXO looks for classes with #[AsKit] only in the project and in active AddOns. The files of the kit sit next to the kit class in src/.

composer.json JSON
{
    "name": "acme/fluid-kit-nature",
    "type": "redaxo-addon",
    "require": { "klxm/fluid": "*@dev" },
    "autoload": { "psr-4": { "Acme\\FluidKitNature\\": "src/" } },
    "extra": { "redaxo": { "addon-class": "Acme\\FluidKitNature\\NatureAddon" } }
}
src/NatureAddon.php PHP
<?php

namespace Acme\FluidKitNature;

use Redaxo\Core\Addon\Addon;

// Leere AddOn-Klasse: damit REDAXO das Paket kennt und das Kit (src/NatureKit.php) findet
final class NatureAddon extends Addon {}

After composer require and console migrate the kit is available for selection.

Try it

This site is built with REDAXO 6 and fluid.

Sign in, tap “Edit” – and change every text, every image and the whole design right here.