kiwi / contao-responsive-base
This bundle enables you to place contents within a self configured responsive grid system within Contao CMS.
Package info
github.com/KIWI-Werbeagentur/contao-responsive-base-bundle
Type:contao-bundle
pkg:composer/kiwi/contao-responsive-base
Requires
- php: ^8.3.11
- contao/core-bundle: ^5.3
- kiwi/contao-cmx: ^1.0
- psr/log: ^1.1 || ^2.0 || ^3.0
- symfony/deprecation-contracts: ^3.0
- symfony/polyfill-php84: ^1.31
Requires (Dev)
- contao/manager-plugin: ^2.0
Suggests
- kiwi/contao-blueprints: Simplifies content creation with responsive settings for editors
- kiwi/contao-bootstrap: Use this base bundle with Bootstrap as the responsive CSS framework
- kiwi/contao-designer: Manage CSS framework design settings via klickibunti in the CMS
Provides
None
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
- kiwi/contao-bootstrap: <1.1.4
Replaces
None
- dev-main
- 1.1.1
- 1.1.0
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- v0.2.x-dev
- 0.2
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1
- dev-fix-spacing-empty-default
- dev-v1.1.x-flex-defaults
- dev-v1.1.x-fix-twig-inheritance
- dev-feature/spacings
- dev-intermediate/templates
This package is auto-updated.
Last update: 2026-11-23 20:42:21 UTC
README
Provides basic configuration to implement responsive CSS frameworks into your Contao CMS.
Table of contents
Supported Frameworks
- Bootstrap 5.2 (via KIWI. Contao Bootstrap Bundle)
Disclaimer
This bundles itself does not implement a framework and is not meant to be used as-is. It is a starting point for your own responsive CSS framework.
See our KIWI. Contao Bootstrap Bundle as an example on how to implement a framework.
If you implement a new framework based on this bundle, we would be happy to add it to the list of supported frameworks.
Features
- pre-configuration for breakpoints
- responsive BE widgets:
- responsive
- optionalResponsive
- responsiveSubpalette
- optionalResponsiveSubpalette
- the configured breakpoints in the frontend, in CSS and JS
Breakpoints in the frontend
Every page gets the configured breakpoints inline, so no request is needed and they are available right away.
CSS custom properties
The properties of the active breakpoint are set on <body>, via media queries:
--responsive-key: lg; --responsive-breakpoint: 992; --responsive-modifier: -lg; --responsive-container: 960px;
JS helper: window.KiwiResponsive
Available synchronously to every script on the page, based on matchMedia, so changes are
reported exactly when a breakpoint is crossed, without listening to resize.
KiwiResponsive.current() // "lg" KiwiResponsive.config() // {breakpoint: 992, modifier: "-lg", container: "960px"} KiwiResponsive.up('lg') // true from lg upwards (like media-breakpoint-up) KiwiResponsive.down('lg') // true below lg (like media-breakpoint-down) KiwiResponsive.breakpoints // the whole configuration // called whenever the active breakpoint changes, returns a function to remove the callback const off = KiwiResponsive.onChange(({key, prevKey}) => { /* ... */ }) // also called right away (prevKey: null), for code that has to run now and on every change KiwiResponsive.onChange(({key}) => { /* ... */ }, {immediate: true})
Use it instead of hard-coded widths like window.innerWidth > 992, so the JS follows the
breakpoint configuration. For measurements, prefer measuring the actual element (e.g. the
container's getBoundingClientRect()): the container can be 100%, and the gutters come from CSS.
Deprecated (to be removed in 2.0)
responsive.jswithwindow.responsiveSize,window.KiwiBootstrapand theresponsiveUpdateevent: useKiwiResponsive(current(),config(),onChange()) and the CSS custom propertieswindow.arrBreakpoints: useKiwiResponsive.breakpoints- the
/responsive/breakpoints.jsroute: the breakpoints are now output inline on every page, the script no longer needs to be loaded