🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Compte Get it free
Responsive Containers icon
Peut-être abandonné Tested up to 5.2.31 #1 in container queries

Responsive Containers

CSS media queries let us style elements based on the size of the screen. What if we wanted to style them based on the size of their container? A widget or block should often look different if it’s full-width or…

Installations actives10+10+ niveaux
Téléchargements · 30D180▲ +10.4% vs prev. 30d
Évaluation—0 avis
Score de santé23/100En danger
Téléchargements de tous les temps3.6KSince Jul 2019
Support résolu—Aucun fil de discussion récent
A besoin deWP 5.2.0PHP 5.6.20+
Téléchargements · 7j37▼ -14% week over week
Notre verdict

Envisager une alternative

Responsive Containers shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 7 years ago, and scores 23/100 on our health check.

  • Petite base d'utilisateurs (plus de 10 installations actives)
  • Très peu de critiques jusqu'à présent
  • Pas de mise à jour dans 7 ans
  • Uniquement testé jusqu'à WordPress 5,2 (le dernier est de 7,1)

Téléchargements quotidiens

3710Sep 1Oct 15Nov 29
Hier5
Moyenne quotidienne (1 ans)4
Jour de pointe1410 Septembre 2026
12 Derniers mois1.5K

Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.

Classements

Where Responsive Containers stands today

WordPress.org Classements de recherche

Position en direct dans la recherche de plugins, Top 100
Mot-cléPositionPlugins concurrentsCatégorie
container queries >100 1,138 Best container queries plugins →
responsive containers >100 1,374 Best responsive containers plugins →
responsive design >100 5,364 Best responsive design plugins →

Adoption de version

Part de sites actifs par version.

  • 1.1100.0%

About Responsive Containers

À partir du Lisez-moi officiel · v1.1.0

Description

CSS media queries let us style elements based on the size of the screen. What if we wanted to style them based on the size of their container? A widget or block should often look different if it’s full-width or constrained within a column or sidebar, but we didn’t have any way to write container queries to style those elements based on their on-screen width… until now!

This plugin loads a small JavaScript file that conditionally applies classes to elements based on how wide those elements are in the browser. This can be used by other themes and plugins to write container-specific styles for editor blocks or widgets, so that they will display correctly wherever they are placed in the page.

The script works on the frontend and in the block editor — see your responsive styles live while you’re composing your post, and trust that your widgets and blocks will look their best whether they’re full-width or in the narrowest sidebar.

Usage

If you have a block or widget in your site that you wish to use as a responsive container, add the data-responsive-container attribute to that block’s container element. For example, the parent <div> for a calendar block might look like this:

<div class="calendar-block" data-responsive-container>

By adding that data-attribute and nothing more, your container will now be tagged with additional classes based on how big they appear:
– No special class if the container is below 420px (style for this narrow context as your default).
– container-sm if the container is 420px wide or more,
– container-md if it is wider than 600px,
– container-lg if it is wider than 720px, and
– container-xl for any element 960px or wider.

These are default values and therefore somewhat arbitrary, so you may also provide your own custom theme- or plugin-specific breakpoint values using the data-responsive-container attribute. When rendering your element or block in PHP, pass an array of class names and the minimum width at which each class should be applied. These class names can be generic like the default .container-* classes, or they may be specific to the element being styled:

echo sprintf(
  '<div class="myblock" data-responsive-container="%s">',
  esc_attr( wp_json_encode( [
    'myblock--2-column' => 600,
    'myblock--3-column' => 900,
  ] )
);

In this example your container would receive the .myblock--2-column class from 600px up, and .myblock--3-column at or above 900px.

Note that in this case the .myblock element receives no custom class below 600px. We don’t apply any class names below your specified minimum because we assume styles are written narrow-context-first, but you may ensure your smallest class is always applied by providing a minimum width of 0:

echo sprintf(
  '<div class="myblock" data-responsive-container="%s">',
  esc_attr( wp_json_encode( [
    'myblock--1-column' => 0, // Will apply in all circumstances.
    'myblock--2-column' => 600,
    'myblock--3-column' => 900,
  ] )
);

From within WordPress

  1. Visitez « Plugins > Ajouter un nouveau »
  2. Search for ‘Responsive Containers’
  3. Activate the Responsive Containers plugin from your Plugins page.
  4. Start using data-responsive-container attributes within your theme or plugin.

Manually

  1. Téléchargez le dossier responsive-containers dans le répertoire /wp-content/plugins/
  2. Activate the Responsive Containers plugin from your Plugins page.
  3. Start using data-responsive-container attributes within your theme or plugin.

License & Attribution

This plugin is licensed under the terms of the GNU General Public License (or “GPL”). It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

It was created by K. Adam White at Human Made, based on a concept popularized by Philip Walton.

This plugin utilizes the resize-observer-polyfill library by Denis Rul, released under the MIT license and © 2016 Denis Rul.

Journal de modifications

1.1

  • Alter class application logic to always apply classes once their minimum threshold width has been met or exceeded.
  • Adjust default breakpoint cutoffs.
  • Adjust README formatting to fix code block rendering issues.
  • Begin work to support usage within the block editor.
  • Un-document the responsive_container_breakpoints() method until it is confirmed to be a useful helper.

1.0

  • Loads responsive-containers.js to observe and decorate data-responsive-container elements.
  • Introduces responsive_container_breakpoints() method to render a stringified & attribute-escaped custom breakpoints array.

Journal des modifications complet sur WordPress.org →

Pour les développeurs

Est-ce votre plugin ? Montrez les chiffres.

Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.

Badge d'installations actives Badge Badge de score de santé

FAQ

Responsive Containers: quick answers

Réponses directes, extraites des données en direct WordPress.org.

Source : WordPress.org

Is Responsive Containers free?

Yes. Responsive Containers is free to download and use from the official WordPress.org plugin directory.

Is Responsive Containers safe to use in 2026?

Responsive Containers shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 7 years ago, and scores 23/100 on our health check.

How many websites use Responsive Containers?

Responsive Containers is active on 10+ WordPress websites and has been downloaded 3,607 times since it launched in July 2019. It was downloaded 180 times in the last 30 days.

Does Responsive Containers work with WordPress 7.1?

Responsive Containers is officially tested up to WordPress 5.2.31, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

What PHP version does Responsive Containers need?

Responsive Containers requires PHP 5.6.20 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Responsive Containers last updated?

The latest version, 1.1.0, was released on July 20, 2019 (7 years ago).

Who makes Responsive Containers?

Responsive Containers is developed and maintained by K. Adam White.

Propulsé par PageForge

Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.

PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.

  • CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
  • Son propre titre, URL, SEO champs et schéma pour chaque page
  • Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
  • Gratuit sur WordPress.org, pas de carte de crédit

↑↓ bouger↵ ouvrir