Skip to content

Block Kit

klehm/content-blocks-kit is an optional package of 17 ready-to-use block types for ContentBlocks. Install it and you get a full block palette out of the box — no configuration required.

The kit is self-contained: no Tailwind, no Bootstrap, no LiipImagine, no icon library. Every block renders neutral cb-kit-* markup styled by a single shipped stylesheet, so it drops into any host regardless of its CSS setup.

The 17 blocks

BlockWhat it is
titleHeading with a visual size decoupled from its semantic tag
textPlain paragraph text with a palette color
rich_textWYSIWYG (TinyMCE) rich text
imageImage with size, fit, align, link, caption, rounded corners
galleryImage grid or arrow slider
buttonCall-to-action button (variants, sizes, alignment)
cardImage/title/text/button tiles as a grid or list
listBulleted / checkmark / numbered list
iconA single icon from the shipped icon set
alertInfo / success / warning / error callout
dividerHorizontal rule (style + color)
accordionCollapsible panels (native <details>, zero JS)
tableColumns + rows data table
embedResponsive YouTube / Vimeo embed
breadcrumbBreadcrumb trail
tabsTabbed panels
html_rawRaw-HTML escape hatch (disabled by default)

Each block has its own reference page with its full configurable surface — see the sidebar.

Installation

bash
composer require klehm/content-blocks klehm/content-blocks-kit

The blocks are auto-registered via Symfony autoconfiguration — no config needed to get all of them (except html_raw, which is disabled by default).

Front stylesheet (required)

Kit blocks render with neutral cb-kit-* classes styled by a stylesheet the kit serves at a public route. Include it once in your front layout (it also flows into the builder preview):

twig
<link rel="stylesheet" href="{{ path('content_blocks_kit_asset_css') }}">

Retheme by overriding the --cb-kit-* custom properties (or the classes) in your own stylesheet loaded after it.

Stimulus controllers

Two blocks need a Stimulus controller. Enable them in your host assets/controllers.json under the @klehm/content-blocks-kit package:

ControllerNeeded by
cb-tinymcerich_text
cb-gallerygallery (slider layout only)

Colors

Every color field in the kit — icon and divider colors, the title and text blocks' text color, and the rich-text (TinyMCE) swatches — draws from the one core palette declared in content_blocks.palette. Add a named color there once and it appears everywhere:

yaml
# config/packages/content_blocks.yaml
content_blocks:
    palette:
        - { label: 'Brand', color: '#eb0540' }

Discovering the surface from the CLI

Every block's options, choice fields (default marked *) and data defaults are introspectable — read straight from the code, so the output never goes stale:

bash
bin/console content-blocks-kit:blocks              # all blocks, human-readable
bin/console content-blocks-kit:blocks button       # one block
bin/console content-blocks-kit:blocks --format=json   # machine-readable (drives these docs)

The per-block reference pages in this section are generated from that JSON, so they always match the installed version.

Next

Released under the MIT License.