Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Bootstrap5 Blocks

No security coverage Under active development

Bootstrap5 Blocks

Bootstrap5 Blocks provides ready-to-use Bootstrap 5 components as Drupal block types with fields, so site builders and editors can create modern layouts and UI elements without writing custom code.

Each component is an independent submodule that installs its block type, fields, form display and view display as regular Drupal configuration. Enable only the blocks your site needs, and adjust them through the Drupal UI.

Features

  • 14 Bootstrap 5 components as content block types, each in its own submodule.
  • Configurable through the UI: labels, help texts, defaults, required fields, field order, formatters and image styles via "Manage fields", "Manage form display" and "Manage display". No code changes needed.
  • Repeating items with Paragraphs (accordion items, tabs, slides, pricing plans and more).
  • Images from the Media Library, reusing your site's existing "Image" media type.
  • Shared fields: block types reuse the same fields, and fields that already exist on your site (such as the standard body field) are reused instead of duplicated.
  • Works with the Block layout and Layout Builder, including inline blocks.
  • Overridable Twig templates for every component.
  • Optional CDN loading of Bootstrap 5 and Bootstrap Icons for themes that don't include them.
  • Clean uninstall: removing a submodule removes its block type, paragraph types and unused fields, and protects you from leaving orphaned content behind.

Included blocks

  • Accordion: collapsible content sections, with flush and always-open modes.
  • Tabs: tabs, pills or underline navigation, horizontal or vertical.
  • Featured Card: card with image, header, title, body, buttons and footer.
  • Impressed Card: promotional card with a horizontal or image-overlay layout, badge, shadow and hover effect.
  • Carousel: image slider with captions, buttons, indicators, autoplay and crossfade.
  • Alert: contextual message with heading, icon and close button.
  • Hero Banner: large heading, lead text, buttons and optional background image.
  • Call to Action: banner with text and a button.
  • Modal: button that opens a modal dialog.
  • List Group: list of items or links with badges.
  • Pricing Table: plan cards with features and a highlighted plan.
  • Testimonials: quotes as a card grid or carousel.
  • Feature Grid: features or services with icons and links.
  • Stats: key figures and counters.

Why use this module?

  • Avoid rebuilding the same Bootstrap components on every project.
  • Let editors build layouts without custom Twig or HTML.
  • Keep content as content: blocks are translatable, revisionable entities, not configuration.
  • Keep projects consistent with standardized, tested block types.
  • Follows Drupal best practices: modular submodules, configuration schema, dependency injection, automated tests, PHPCS and PHPStan.

Post-Installation

  1. Go to Extend (/admin/modules) and enable the block submodules you need, for example "Bootstrap5 Blocks - Accordion". The main module and required modules are enabled automatically.
  2. Add a block at Content → Blocks → Add content block (/block/add) and choose a "Bootstrap 5: …" block type.
  3. Place it from Structure → Block layout (/admin/structure/block), or add it as an inline block in Layout Builder.
  4. Give your editor roles the per-type permissions, for example "Bootstrap 5: Accordion: Create new content block".
  5. Make sure visitors have the "View media" permission, so images are displayed.
  6. Optional: if your theme does not include Bootstrap 5, enable CDN loading at Configuration → Content authoring → Bootstrap5 Blocks (/admin/config/content/bootstrap5-blocks).

To change a block type, use the "Manage fields", "Manage form display" and "Manage display" tabs at Structure → Block types.

Additional Requirements

  • Drupal 11.3 or later and PHP 8.3 or later.
  • Core modules: Block, Custom Block, Field, File, Filter, Image, Link, Media, Media Library, Options and Text.
  • Paragraphs (with Entity Reference Revisions), for the blocks with repeating items.
  • A theme that includes Bootstrap 5 CSS and JavaScript. The module does not bundle Bootstrap; it relies on your theme, or on the optional CDN setting.

Uninstalling

Uninstalling a block submodule removes its block type, paragraph types and fields no other block type uses. Uninstalling is refused while blocks of that type still exist; delete them first, for example:

drush entity:delete block_content --bundle=bootstrap5_accordion

See the README for deploying an uninstall with configuration sync.

Ask your assistant about Bootstrap5 Blocks

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Nov 2026
Latest release
4 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 11 PHP >=8.3 Nov 27, 2026