<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zeus07</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zeus07"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Zeus07"/>
	<updated>2026-08-10T21:35:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J4.x:Using_Bootstrap_Components_in_Joomla_4&amp;diff=923412</id>
		<title>J4.x:Using Bootstrap Components in Joomla 4</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J4.x:Using_Bootstrap_Components_in_Joomla_4&amp;diff=923412"/>
		<updated>2022-06-18T18:31:10Z</updated>

		<summary type="html">&lt;p&gt;Zeus07: /* Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap Components ===&lt;br /&gt;
&lt;br /&gt;
Some of the components described in the Bootstrap documentation use CSS only. For example, the Breadcrumbs component is rendered with CSS and requires no Javascript support. Others respond to user actions such as click or hover, and need Javascript support. The latter are referred to here as Interactive Components. This article explains how to use them in Articles and a Custom Module.&lt;br /&gt;
&lt;br /&gt;
See: [https://getbootstrap.com/docs/5.0/getting-started/introduction/ Bootstrap Documentation]&lt;br /&gt;
&lt;br /&gt;
=== Joomla 4 introduces a modular approach for Interactive Components ===&lt;br /&gt;
&lt;br /&gt;
* What is a modular approach?&lt;br /&gt;
* The functionality is broken down into individual components supported by individual files. There is no &#039;&#039;&#039;one file&#039;&#039;&#039; approach as it was with Bootstrap in Joomla 3. The modular approach is more efficient and offers performance gains (send only the code that is needed instead of delivering everything in case some page will need some component).&lt;br /&gt;
&lt;br /&gt;
=== Using Interactive Components: Coders ===&lt;br /&gt;
&lt;br /&gt;
* Load what you need per case! There are helper functions to set up individual components with appropriate arguments.&lt;br /&gt;
* See the list of Bootstrap Interactive Components.&lt;br /&gt;
&lt;br /&gt;
=== Using Interactive Components: Non-Coders ===&lt;br /&gt;
&lt;br /&gt;
* Using components in articles is not so easy because the helper functions cannot be called from an article or standard Custom HTML module. Three possible solutions are suggested later in this tutorial:&lt;br /&gt;
** A custom module&lt;br /&gt;
** A custom plugin&lt;br /&gt;
** A custom module override&lt;br /&gt;
* Skip or scan the list of Bootstrap Interactive Components. You won&#039;t be using these function calls directly.&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Interactive Components ==&lt;br /&gt;
&lt;br /&gt;
Please note that as of Joomla Beta8-Dev there appear to be some problems with some of these components!&lt;br /&gt;
&lt;br /&gt;
=== Alert ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.alert&#039;, &#039;.selector&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the alert. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* No extra options available&lt;br /&gt;
&lt;br /&gt;
=== Button ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.button&#039;, &#039;.selector&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the button. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* No extra options available&lt;br /&gt;
&lt;br /&gt;
=== Carousel ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.carousel&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the carousel. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for carousel&lt;br /&gt;
&lt;br /&gt;
Options for the carousel can be:&lt;br /&gt;
* &#039;&#039;&#039;interval&#039;&#039;&#039;, number, default:&#039;&#039;&#039;5000&#039;&#039;&#039;, The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.&lt;br /&gt;
* &#039;&#039;&#039;keyboard&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039; Whether the carousel should react to keyboard events.&lt;br /&gt;
* &#039;&#039;&#039;pause&#039;&#039;&#039;, string|boolean, &#039;&#039;&#039;hover&#039;&#039;&#039; Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.&lt;br /&gt;
* &#039;&#039;&#039;slide&#039;&#039;&#039;, string|boolean, default:&#039;&#039;&#039;false&#039;&#039;&#039; Autoplays the carousel after the user manually cycles the first item. If &amp;quot;carousel&amp;quot;, autoplays the carousel on load.&lt;br /&gt;
&lt;br /&gt;
=== Collapse ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.collapse&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the collapse. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for collapse&lt;br /&gt;
&lt;br /&gt;
Options for the collapse can be:&lt;br /&gt;
* &#039;&#039;&#039;parent&#039;&#039;&#039;, string, default:&#039;&#039;&#039;false&#039;&#039;&#039; If parent is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown.&lt;br /&gt;
* &#039;&#039;&#039;toggle&#039;&#039;&#039;, boolean default:&#039;&#039;&#039;true&#039;&#039;&#039; Toggles the collapsible element on invocation&lt;br /&gt;
&lt;br /&gt;
=== Dropdown ===&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.dropdown&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the dropdown. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for dropdown&lt;br /&gt;
&lt;br /&gt;
Options for the collapse can be:&lt;br /&gt;
* &#039;&#039;&#039;flip&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039; Allow Dropdown to flip in case of an overlapping on the reference element&lt;br /&gt;
* &#039;&#039;&#039;boundary&#039;&#039;&#039;, string, default:&#039;&#039;&#039;scrollParent&#039;&#039;&#039; Overflow constraint boundary of the dropdown menu&lt;br /&gt;
* &#039;&#039;&#039;reference&#039;&#039;&#039;, string, default:&#039;&#039;&#039;toggle&#039;&#039;&#039; Reference element of the dropdown menu. Accepts &#039;&#039;&#039;toggle&#039;&#039;&#039; or &#039;&#039;&#039;parent&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;display&#039;&#039;&#039;, string, default:&#039;&#039;&#039;dynamic&#039;&#039;&#039; By default, we use Popper for dynamic positioning. Disable this with &#039;&#039;&#039;static&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Modal ===&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.modal&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the modal. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for modal&lt;br /&gt;
&lt;br /&gt;
Options for the modal can be:&lt;br /&gt;
* &#039;&#039;&#039;backdrop&#039;&#039;&#039;, string|boolean default:&#039;&#039;&#039;true&#039;&#039;&#039; Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn&#039;t close the modal on click.&lt;br /&gt;
* &#039;&#039;&#039;keyboard&#039;&#039;&#039;, boolean default:&#039;&#039;&#039;true&#039;&#039;&#039; Closes the modal when escape key is pressed&lt;br /&gt;
* &#039;&#039;&#039;focus&#039;&#039;&#039;, boolean default:&#039;&#039;&#039;true&#039;&#039;&#039; Closes the modal when escape key is pressed&lt;br /&gt;
&lt;br /&gt;
=== Offcanvas ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notice: as of Beta8-Dev this component is not present in Joomla!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.offcanvas&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the offcanvas. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for offcanvas&lt;br /&gt;
&lt;br /&gt;
Options for the offcanvas can be:&lt;br /&gt;
* &#039;&#039;&#039;backdrop&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039;   Apply a backdrop on body while offcanvas is open&lt;br /&gt;
* &#039;&#039;&#039;keyboard&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039;   Closes the offcanvas when escape key is pressed&lt;br /&gt;
* &#039;&#039;&#039;scroll&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;false&#039;&#039;&#039;  Allow body scrolling while offcanvas is open&lt;br /&gt;
&lt;br /&gt;
=== Popover ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.popover&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the popover. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for popover&lt;br /&gt;
&lt;br /&gt;
Options for the popover can be:&lt;br /&gt;
* &#039;&#039;&#039;animation&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039; Apply a CSS fade transition to the popover&lt;br /&gt;
* &#039;&#039;&#039;container&#039;&#039;&#039;, string|boolean, default:&#039;&#039;&#039;false&#039;&#039;&#039;  Appends the popover to a specific element. Eg.: &#039;&#039;&#039;body&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;content&#039;&#039;&#039;, string, default:&#039;&#039;&#039;null&#039;&#039;&#039;   Default content value if data-bs-content attribute isn&#039;t present&lt;br /&gt;
* &#039;&#039;&#039;delay&#039;&#039;&#039;, number, default:&#039;&#039;&#039;0&#039;&#039;&#039;      Delay showing and hiding the popover (ms) does not apply to manual trigger type&lt;br /&gt;
* &#039;&#039;&#039;html&#039;&#039;&#039;, boolean, default:&#039;&#039;&#039;true&#039;&#039;&#039;   Insert HTML into the popover. If &#039;&#039;&#039;false&#039;&#039;&#039;, innerText property will be used to insert content into the DOM.&lt;br /&gt;
* &#039;&#039;&#039;placement&#039;&#039;&#039;, string, default:&#039;&#039;&#039;right&#039;&#039;&#039;  How to position the popover - &#039;&#039;&#039;auto&#039;&#039;&#039; | &#039;&#039;&#039;top&#039;&#039;&#039; | &#039;&#039;&#039;bottom&#039;&#039;&#039; | &#039;&#039;&#039;left&#039;&#039;&#039; | &#039;&#039;&#039;right&#039;&#039;&#039;. When auto is specified, it will dynamically reorient the popover&lt;br /&gt;
* &#039;&#039;&#039;selector&#039;&#039;&#039;, string, default:&#039;&#039;&#039;false&#039;&#039;&#039;  If a selector is provided, popover objects will be delegated to the specified targets.&lt;br /&gt;
* &#039;&#039;&#039;template&#039;&#039;&#039;, string, default:&#039;&#039;&#039;null&#039;&#039;&#039;   Base HTML to use when creating the popover.&lt;br /&gt;
* &#039;&#039;&#039;title&#039;&#039;&#039;, string, default:&#039;&#039;&#039;null&#039;&#039;&#039;   Default title value if &#039;&#039;&#039;title&#039;&#039;&#039; tag isn&#039;t present&lt;br /&gt;
* &#039;&#039;&#039;trigger&#039;&#039;&#039;, string, default:&#039;&#039;&#039;click&#039;&#039;&#039;  How popover is triggered - &#039;&#039;&#039;click&#039;&#039;&#039; | &#039;&#039;&#039;hover&#039;&#039;&#039; | &#039;&#039;&#039;focus&#039;&#039;&#039; | &#039;&#039;&#039;manual&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;offset&#039;&#039;&#039;, integer, default:&#039;&#039;&#039;0&#039;&#039;&#039;      Offset of the popover relative to its target.&lt;br /&gt;
&lt;br /&gt;
=== Scrollspy ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.scrollspy&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the scrollspy. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for scrollspy&lt;br /&gt;
&lt;br /&gt;
Options for the Scrollspy can be:&lt;br /&gt;
* &#039;&#039;&#039;offset&#039;&#039;&#039;  number  Pixels to offset from top when calculating position of scroll.&lt;br /&gt;
* &#039;&#039;&#039;method&#039;&#039;&#039;  string  Finds which section the spied element is in.&lt;br /&gt;
* &#039;&#039;&#039;target&#039;&#039;&#039;  string  Specifies element to apply Scrollspy plugin.&lt;br /&gt;
&lt;br /&gt;
=== Tab ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.tab&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the tab. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for tab&lt;br /&gt;
&lt;br /&gt;
Options for the Tab can be:&lt;br /&gt;
&lt;br /&gt;
=== Tooltip ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.tooltip&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the tooltip. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for tooltip&lt;br /&gt;
&lt;br /&gt;
Options for the tooltip can be:&lt;br /&gt;
* &#039;&#039;&#039;animation&#039;&#039;&#039;, boolean          apply a css fade transition to the popover&lt;br /&gt;
* &#039;&#039;&#039;container&#039;&#039;&#039;, string|boolean   Appends the popover to a specific element: { container: &#039;&#039;&#039;body&#039;&#039;&#039; }&lt;br /&gt;
* &#039;&#039;&#039;delay&#039;&#039;&#039;, number|object    delay showing and hiding the popover (ms) - does not apply to manual trigger type If a number is supplied, delay is applied to both hide/show Object structure is: delay: { show: 500, hide: 100 }&lt;br /&gt;
* &#039;&#039;&#039;html&#039;&#039;&#039;, boolean Insert HTML into the popover. If false, jQuery&#039;s text method will be used to insert content into the dom.&lt;br /&gt;
* &#039;&#039;&#039;placement&#039;&#039;&#039;, string|function  how to position the popover - &#039;&#039;&#039;top&#039;&#039;&#039; | &#039;&#039;&#039;bottom&#039;&#039;&#039; | &#039;&#039;&#039;left&#039;&#039;&#039; | &#039;&#039;&#039;right&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;selector&#039;&#039;&#039; string If a selector is provided, popover objects will be delegated to the specified targets.&lt;br /&gt;
* &#039;&#039;&#039;template&#039;&#039;&#039;, string           Base HTML to use when creating the popover.&lt;br /&gt;
* &#039;&#039;&#039;title&#039;&#039;&#039;, string|function  default title value if &#039;&#039;&#039;title&#039;&#039;&#039; tag isn&#039;t present&lt;br /&gt;
* &#039;&#039;&#039;trigger&#039;&#039;&#039;, string           how popover is triggered - hover | focus | manual&lt;br /&gt;
* &#039;&#039;&#039;constraints&#039;&#039;&#039;, array            An array of constraints - passed through to Popper.&lt;br /&gt;
* &#039;&#039;&#039;offset&#039;&#039;&#039;, string           Offset of the popover relative to its target.&lt;br /&gt;
&lt;br /&gt;
=== Toast ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have the HTML part already in your Layout, you will also need to include the interactivity (the javascript part): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.toast&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;.selector&#039;&#039;&#039; refers to the CSS selector for the toast. You can call this function multiple times with different CSS selectors&lt;br /&gt;
* The third argument refers to the options available for toast&lt;br /&gt;
&lt;br /&gt;
Options for the toast can be:&lt;br /&gt;
* &#039;&#039;&#039;animation&#039;&#039;&#039;, boolean, deafult:&#039;&#039;&#039;true&#039;&#039;&#039; Apply a CSS fade transition to the toast&lt;br /&gt;
* &#039;&#039;&#039;autohide&#039;&#039;&#039;, boolean, deafult:&#039;&#039;&#039;true&#039;&#039;&#039; Auto hide the toast&lt;br /&gt;
* &#039;&#039;&#039;delay&#039;&#039;&#039;, number	, deafult:&#039;&#039;&#039;5000&#039;&#039;&#039; Delay hiding the toast (ms)&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Accordian&#039;&#039;&#039; uses Collapse to display panels of data.&lt;br /&gt;
* &#039;&#039;&#039;List Group&#039;&#039;&#039; can be combined with Tab to display tabbed content.&lt;br /&gt;
&lt;br /&gt;
== Using Bootstrap Components in Articles ==&lt;br /&gt;
&lt;br /&gt;
The HTML mark-up for most components can be included in an article or a module that can itself be included in an article. The snag is that the HTMLHelper call to set up the Javascript support cannot be included there. There are several possible approaches to this problem. Three approaches are suggested here, using a custom Module, using a Plugin or using a Template override.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Caution:&#039;&#039;&#039; The TinyMCE and JCE editors remove white space on Save and make editing code difficult! The simple solution is to go to the top right of your Administrator screen and select {{rarr|User Menu,Edit Account}} and set the Editor to Code Mirror.&lt;br /&gt;
&lt;br /&gt;
== Approach 1: Using a custom Custom module ==&lt;br /&gt;
&lt;br /&gt;
This is probably the least error prone approach because the Bootstrap component support options are selected with check boxes. The steps involved are as follows:&lt;br /&gt;
&lt;br /&gt;
* Download, install and enable this module: https://github.com/ceford/j4xdemos-mod-custom-bscompos/raw/master/mod_custom_bscompos.zip&lt;br /&gt;
* From the Administrator menu go to {{rarr|Content,Site Modules,New}}&lt;br /&gt;
* Select &#039;&#039;&#039;Custom BS Components&#039;&#039;&#039;&lt;br /&gt;
* Enter a Title&lt;br /&gt;
* Toggle the Editor to plain text mode and paste in or type in the HTML code for the component you want to use.&lt;br /&gt;
* In the Options tab scroll down to the list of BS Components and select type of component in this instance of the module. Note that you can select more than one if your using more than one component.&lt;br /&gt;
* Select a module Position: either&lt;br /&gt;
** a template defined position if you want to use the module in a specific location or &lt;br /&gt;
** type in a position if you wish to use the module within a specific article: in the article type in &amp;amp;lt;div&amp;gt;{loadposition whatever}&amp;amp;lt;/div&amp;gt;&lt;br /&gt;
* Save and go to the site to Test!&lt;br /&gt;
&lt;br /&gt;
=== Selectors ===&lt;br /&gt;
&lt;br /&gt;
For some components Javascript action is triggered by a specific &#039;&#039;&#039;class&#039;&#039;&#039; in the HTML code. In other components action is triggered by a &#039;&#039;&#039;data-bs-whatever&#039;&#039;&#039; attribute. The following are the current triggers and may change:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Alert&#039;&#039;&#039; triggered by class=&amp;quot;alert ...&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Button&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;button&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Carousel&#039;&#039;&#039; triggered by data-bs-ride=&amp;quot;whatever&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Collapse&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;collapse&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Dropdown&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;dropdown&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Modal&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;modal&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Offcanvas&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;offcanvas&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Popover&#039;&#039;&#039; triggered by class=&amp;quot;btn ...&amp;quot; or &amp;amp;lt;a ...&amp;gt; tag (could be changed to class=&amp;quot;haspopover ...&amp;quot;) AND data-bs-toggle=&amp;quot;popover&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Scrollspy&#039;&#039;&#039; triggered by data-bs-spy=&amp;quot;scroll&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Tab&#039;&#039;&#039; triggered by data-bs-toggle=&amp;quot;tab&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Toast&#039;&#039;&#039; triggered by class=&amp;quot;toast ...&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Tooltip&#039;&#039;&#039; triggered by class=&amp;quot;btn ...&amp;quot; or &amp;amp;lt;a ...&amp;gt; tag (could be changed to class=&amp;quot;hastooltip ...&amp;quot;) AND data-bs-toggle=&amp;quot;tooltip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Alert ===&lt;br /&gt;
&lt;br /&gt;
Alerts may be used in html code without Javascript support. This is only needed for the dismiss capability. HTML code example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;div class=&amp;quot;alert alert-warning alert-dismissible fade show&amp;quot; role=&amp;quot;alert&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;strong&amp;gt;Holy guacamole!&amp;lt;/strong&amp;gt; You should check in on some of those fields below.&lt;br /&gt;
  &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn-close&amp;quot; data-bs-dismiss=&amp;quot;alert&amp;quot; aria-label=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example result of including a module in an article:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-alert-demo.png|border|Alert Demo]]&lt;br /&gt;
&lt;br /&gt;
Note that without Javascript support the alert will appear exactly as above but a click on the close button [X] will not dismiss the alert. Also, the alert will appear on every page load.&lt;br /&gt;
&lt;br /&gt;
=== Example 2: Buttons ===&lt;br /&gt;
&lt;br /&gt;
Buttons may be used in HTML code without Javascript support. This is only needed for the sometimes subtle change of style applied to buttons with a change of state, styled active. Bootstrap example code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; data-bs-toggle=&amp;quot;button&amp;quot; autocomplete=&amp;quot;off&amp;quot;&amp;gt;Toggle button&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary active&amp;quot; data-bs-toggle=&amp;quot;button&amp;quot; autocomplete=&amp;quot;off&amp;quot; aria-pressed=&amp;quot;true&amp;quot;&amp;gt;Active toggle button&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; disabled data-bs-toggle=&amp;quot;button&amp;quot; autocomplete=&amp;quot;off&amp;quot;&amp;gt;Disabled toggle button&amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot; class=&amp;quot;btn btn-primary&amp;quot; role=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;button&amp;quot;&amp;gt;Toggle link&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;#&amp;quot; class=&amp;quot;btn btn-primary active&amp;quot; role=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;button&amp;quot; aria-pressed=&amp;quot;true&amp;quot;&amp;gt;Active toggle link&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;#&amp;quot; class=&amp;quot;btn btn-primary disabled&amp;quot; tabindex=&amp;quot;-1&amp;quot; aria-disabled=&amp;quot;true&amp;quot; role=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;button&amp;quot;&amp;gt;Disabled toggle link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this style in the template user.css:&lt;br /&gt;
&amp;lt;pre&amp;gt;.btn.btn-primary.active {&lt;br /&gt;
	background-color: green;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-button-demo.png|border|Button Demo]]&lt;br /&gt;
&lt;br /&gt;
The buttons toggle between blue and green.&lt;br /&gt;
&lt;br /&gt;
=== Example 3: Carousel ===&lt;br /&gt;
&lt;br /&gt;
The Carousel offers a slide show cycling through a series of images or text panes. The following example used images from the Joomla 4 Sample. Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;carouselExampleCaptions&amp;quot; class=&amp;quot;carousel slide&amp;quot; data-bs-ride=&amp;quot;carousel&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;carousel-indicators&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;button class=&amp;quot;active&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;0&amp;quot; aria-current=&amp;quot;true&amp;quot; aria-label=&amp;quot;Slide 1&amp;quot;&amp;gt;&amp;lt;/button&amp;gt; &lt;br /&gt;
		&amp;lt;button type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;1&amp;quot; aria-label=&amp;quot;Slide 2&amp;quot;&amp;gt;&amp;lt;/button&amp;gt; &lt;br /&gt;
		&amp;lt;button type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;2&amp;quot; aria-label=&amp;quot;Slide 3&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;carousel-inner&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;carousel-item active&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa1-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;h5&amp;gt;First slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
				&amp;lt;p&amp;gt;Some representative placeholder content for the first slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;carousel-item&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa2-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;h5&amp;gt;Second slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
				&amp;lt;p&amp;gt;Some representative placeholder content for the second slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;carousel-item&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa3-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;h5&amp;gt;Third slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
				&amp;lt;p&amp;gt;Some representative placeholder content for the third slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;button class=&amp;quot;carousel-control-prev&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide=&amp;quot;prev&amp;quot;&amp;gt; &lt;br /&gt;
		&amp;lt;span class=&amp;quot;visually-hidden&amp;quot;&amp;gt;Previous&amp;lt;/span&amp;gt; &lt;br /&gt;
	&amp;lt;/button&amp;gt; &lt;br /&gt;
	&amp;lt;button class=&amp;quot;carousel-control-next&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide=&amp;quot;next&amp;quot;&amp;gt; &lt;br /&gt;
		&amp;lt;span class=&amp;quot;visually-hidden&amp;quot;&amp;gt;Next&amp;lt;/span&amp;gt; &lt;br /&gt;
	&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-carousel-demo.jpg|border|Carousel Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Example 4: Collapse ===&lt;br /&gt;
&lt;br /&gt;
Collapse is widely used in Joomla and you may not need to use a module or plugin to trigger action. The click opens a pane with extra information. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
	&amp;lt;a class=&amp;quot;btn btn-primary&amp;quot; role=&amp;quot;button&amp;quot; href=&amp;quot;#collapseExample&amp;quot; data-bs-toggle=&amp;quot;collapse&amp;quot; aria-expanded=&amp;quot;false&amp;quot; aria-controls=&amp;quot;collapseExample&amp;quot;&amp;gt; Link with href &amp;lt;/a&amp;gt; &lt;br /&gt;
	&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;collapse&amp;quot; data-bs-target=&amp;quot;#collapseExample&amp;quot; aria-expanded=&amp;quot;false&amp;quot; aria-controls=&amp;quot;collapseExample&amp;quot;&amp;gt; &lt;br /&gt;
		Button with data-bs-target &lt;br /&gt;
	&amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;collapseExample&amp;quot; class=&amp;quot;collapse&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;card card-body&amp;quot;&amp;gt;&lt;br /&gt;
		Some placeholder content for the collapse component. This panel is hidden by default but revealed when the user activates the relevant trigger.&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-collapse-demo.png|border|Collapse Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Example 5: Dropdown ===&lt;br /&gt;
&lt;br /&gt;
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;btn-group&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;button class=&amp;quot;btn btn-danger dropdown-toggle&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;dropdown&amp;quot; aria-expanded=&amp;quot;false&amp;quot;&amp;gt; Action &amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;ul class=&amp;quot;dropdown-menu&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Action&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Another action&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Something else here&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;li&amp;gt;&amp;lt;hr class=&amp;quot;dropdown-divider&amp;quot; /&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Separated link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-dropdown-demo.png|border|Dropdown Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Example 6: Modal ===&lt;br /&gt;
&lt;br /&gt;
The Modal component opens a dialog box in the middle of the screen. There are quite a few options to control the size and content of the modal. See the Bootstrap documentation for more details. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;modal&amp;quot; data-bs-target=&amp;quot;#exampleModal&amp;quot;&amp;gt; Launch demo modal &amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;exampleModal&amp;quot; class=&amp;quot;modal fade&amp;quot; tabindex=&amp;quot;-1&amp;quot; aria-labelledby=&amp;quot;exampleModalLabel&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;modal-dialog&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;modal-content&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-header&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;h5 id=&amp;quot;exampleModalLabel&amp;quot; class=&amp;quot;modal-title&amp;quot;&amp;gt;Modal title&amp;lt;/h5&amp;gt;&lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn-close&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;modal&amp;quot; aria-label=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-body&amp;quot;&amp;gt;&lt;br /&gt;
				...&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-footer&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;modal&amp;quot;&amp;gt;Close&amp;lt;/button&amp;gt; &lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot;&amp;gt;Save changes&amp;lt;/button&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-modal-demo.png|Modal Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Example 7: Offcanvas ===&lt;br /&gt;
&lt;br /&gt;
At the moment this component is not supported in Joomla. Watch this space - coming soon!&lt;br /&gt;
&lt;br /&gt;
=== Example 8: Popover ===&lt;br /&gt;
&lt;br /&gt;
Popovers are like Tooltips but with a Title. They have some accessibility and performance issues so should be used with caution. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;&amp;lt;button class=&amp;quot;btn btn-lg btn-danger&amp;quot; title=&amp;quot;Popover title&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;popover&amp;quot; data-bs-content=&amp;quot;And here&#039;s some amazing content. It&#039;s very engaging. Right?&amp;quot;&amp;gt;Click to toggle popover&amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-popover-demo.png|border|Popover Demo]]&lt;br /&gt;
&lt;br /&gt;
=== Example 9: Scrollspy ===&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;col-4&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;nav id=&amp;quot;navbar-example3&amp;quot; class=&amp;quot;navbar navbar-light bg-light flex-column&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;a class=&amp;quot;navbar-brand&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Navbar&amp;lt;/a&amp;gt;&amp;lt;nav class=&amp;quot;nav nav-pills flex-column&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;a class=&amp;quot;nav-link active&amp;quot; href=&amp;quot;#item-1&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;nav class=&amp;quot;nav nav-pills flex-column&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;a class=&amp;quot;nav-link ms-3 my-1&amp;quot; href=&amp;quot;#item-1-1&amp;quot;&amp;gt;Item 1-1&amp;lt;/a&amp;gt; &lt;br /&gt;
				&amp;lt;a class=&amp;quot;nav-link ms-3 my-1&amp;quot; href=&amp;quot;#item-1-2&amp;quot;&amp;gt;Item 1-2&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/nav&amp;gt;&lt;br /&gt;
			&amp;lt;a class=&amp;quot;nav-link&amp;quot; href=&amp;quot;#item-2&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt; &lt;br /&gt;
			&amp;lt;a class=&amp;quot;nav-link&amp;quot; href=&amp;quot;#item-3&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;nav class=&amp;quot;nav nav-pills flex-column&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;a class=&amp;quot;nav-link ms-3 my-1&amp;quot; href=&amp;quot;#item-3-1&amp;quot;&amp;gt;Item 3-1&amp;lt;/a&amp;gt; &lt;br /&gt;
				&amp;lt;a class=&amp;quot;nav-link ms-3 my-1&amp;quot; href=&amp;quot;#item-3-2&amp;quot;&amp;gt;Item 3-2&amp;lt;/a&amp;gt;&lt;br /&gt;
			&amp;lt;/nav&amp;gt;&lt;br /&gt;
		&amp;lt;/nav&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;col-8&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;scrollspy-example&amp;quot; tabindex=&amp;quot;0&amp;quot; data-bs-spy=&amp;quot;scroll&amp;quot; data-bs-target=&amp;quot;#navbar-example3&amp;quot; data-bs-offset=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;h4 id=&amp;quot;item-1&amp;quot;&amp;gt;Item 1&amp;lt;/h4&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to item 1. Takes you miles high, so high, &#039;cause she’s got that one international smile. There&#039;s a stranger in my bed, there&#039;s a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents&#039; liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin&#039; heavy. Her love is like a drug. I guess that I forgot I had a choice.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h5 id=&amp;quot;item-1-1&amp;quot;&amp;gt;Item 1-1&amp;lt;/h5&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to the item 1-1. You got the finest architecture. Passport stamps, she&#039;s cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I&#039;d be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she&#039;s the one. Greetings loved ones let&#039;s take a journey. Just own the night like the 4th of July! But you&#039;d rather get wasted.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h5 id=&amp;quot;item-1-2&amp;quot;&amp;gt;Item 1-2&amp;lt;/h5&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to the item 1-2. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. &#039;Cause she&#039;s the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I&#039;m walking, I&#039;m walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h4 id=&amp;quot;item-2&amp;quot;&amp;gt;Item 2&amp;lt;/h4&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to item 2. Don&#039;t need apologies. There is no fear now, let go and just be free, I will love you unconditionally. Last Friday night. Don&#039;t be a shy kinda guy I&#039;ll bet it&#039;s beautiful. Summer after high school when we first met. &#039;Cause she&#039;s the muse and the artist. What? Wait. No, no, no, no. Thought that I was the exception.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h4 id=&amp;quot;item-3&amp;quot;&amp;gt;Item 3&amp;lt;/h4&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to item 3. Word on the street, you got somethin&#039; to show me, me. All this money can&#039;t buy me a time machine. Make it like your birthday everyday. So we hit the boulevard. You make me feel like I&#039;m livin&#039; a teenage dream, the way you turn me on Skip the talk, heard it all, time to walk the walk. Word on the street, you got somethin&#039; to show me, me. It&#039;s no big deal, it&#039;s no big deal, it&#039;s no big deal.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h5 id=&amp;quot;item-3-1&amp;quot;&amp;gt;Item 3-1&amp;lt;/h5&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to item 3-1. Baby do you dare to do this? This is no big deal. Yeah, you&#039;re lucky if you&#039;re on her plane. Just own the night like the 4th of July! Standing on the frontline when the bombs start to fall. So just be sure before you give it all to me.&amp;lt;/p&amp;gt;&lt;br /&gt;
			&amp;lt;h5 id=&amp;quot;item-3-2&amp;quot;&amp;gt;Item 3-2&amp;lt;/h5&amp;gt;&lt;br /&gt;
			&amp;lt;p&amp;gt;Placeholder content for the scrollspy example. This one relates to item 3-2. You&#039;re original, cannot be replaced. All night they&#039;re playing, your song. California girls we&#039;re undeniable. Like a bird without a cage. There is no fear now, let go and just be free, I will love you unconditionally. I can see the writing on the wall. You could travel the world but nothing comes close to the golden coast.&amp;lt;/p&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-scrollspy-demo.png|border|Scrollspy Demo]]&lt;br /&gt;
&lt;br /&gt;
Also, some styling is needed in user.css:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;.scrollspy-example {&lt;br /&gt;
	height: 350px;&lt;br /&gt;
	overflow-y: scroll;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Snag: the menu does not coordinate well with the content in this example!&lt;br /&gt;
&lt;br /&gt;
=== Example 10: Tab ===&lt;br /&gt;
&lt;br /&gt;
Tabs are often used as navigation elements combined with dropdowns. Bootstrap example code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul class=&amp;quot;nav nav-tabs&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;li class=&amp;quot;nav-item&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;nav-link active&amp;quot; href=&amp;quot;#&amp;quot; aria-current=&amp;quot;page&amp;quot;&amp;gt;Active&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li class=&amp;quot;nav-item dropdown&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;nav-link dropdown-toggle&amp;quot; role=&amp;quot;button&amp;quot; href=&amp;quot;#&amp;quot; data-bs-toggle=&amp;quot;dropdown&amp;quot; aria-expanded=&amp;quot;false&amp;quot;&amp;gt;Dropdown&amp;lt;/a&amp;gt;&lt;br /&gt;
		&amp;lt;ul class=&amp;quot;dropdown-menu&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Action&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Another action&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Something else here&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;hr class=&amp;quot;dropdown-divider&amp;quot; /&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;a class=&amp;quot;dropdown-item&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Separated link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;/ul&amp;gt;&lt;br /&gt;
	&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li class=&amp;quot;nav-item&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;nav-link&amp;quot; href=&amp;quot;#&amp;quot;&amp;gt;Link&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li class=&amp;quot;nav-item&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;nav-link disabled&amp;quot; tabindex=&amp;quot;-1&amp;quot; href=&amp;quot;#&amp;quot; aria-disabled=&amp;quot;true&amp;quot;&amp;gt;Disabled&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-tab-demo.png|border|Tab Demo]]&lt;br /&gt;
&lt;br /&gt;
Remember to check both the Tab and Dropdown options for the dropdown part to work.&lt;br /&gt;
&lt;br /&gt;
=== Example 11: Toast ===&lt;br /&gt;
&lt;br /&gt;
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems. They’re built with flexbox, so they’re easy to align and position. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toast fade show&amp;quot; role=&amp;quot;alert&amp;quot; aria-live=&amp;quot;assertive&amp;quot; aria-atomic=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;toast-header&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;img class=&amp;quot;rounded me-2&amp;quot; src=&amp;quot;...&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt; &lt;br /&gt;
		&amp;lt;strong class=&amp;quot;me-auto&amp;quot;&amp;gt;Bootstrap&amp;lt;/strong&amp;gt; &amp;lt;small&amp;gt;11 mins ago&amp;lt;/small&amp;gt; &lt;br /&gt;
		&amp;lt;button class=&amp;quot;btn-close&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;toast&amp;quot; aria-label=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;toast-body&amp;quot;&amp;gt;Hello, world! This is a toast message.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-toast-demo.png|border|Toast Demo]]&lt;br /&gt;
&lt;br /&gt;
Note that the Bootstrap demo that uses a button to show the Toast message needs some extra Javascript. It seems this component needs a coder to make good use of it!&lt;br /&gt;
&lt;br /&gt;
=== Example 12: Tooltip ===&lt;br /&gt;
&lt;br /&gt;
A tooltip is a small piece of text that appears on hover over a button or link element to explain what it is or does. The tooltip can be positioned above or below or to the left or right of the element. If not specified the default position is top. The tooltip will switch to another position if there is insufficient room in the specified position. Example Bootstrap code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;p&amp;gt;&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;Tooltip on left&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot; data-bs-placement=&amp;quot;left&amp;quot;&amp;gt; Tooltip on left &amp;lt;/button&amp;gt; &lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;Tooltip&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot;&amp;gt; Tooltip &amp;lt;/button&amp;gt; &lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;Tooltip on top&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot; data-bs-placement=&amp;quot;top&amp;quot;&amp;gt; Tooltip on top &amp;lt;/button&amp;gt; &lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;Tooltip on right&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot; data-bs-placement=&amp;quot;right&amp;quot;&amp;gt; Tooltip on right &amp;lt;/button&amp;gt; &lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;Tooltip on bottom&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot; data-bs-placement=&amp;quot;bottom&amp;quot;&amp;gt; Tooltip on bottom &amp;lt;/button&amp;gt; &lt;br /&gt;
&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; title=&amp;quot;&amp;amp;lt;em&amp;amp;gt;Tooltip&amp;amp;lt;/em&amp;amp;gt; &amp;amp;lt;u&amp;amp;gt;with&amp;amp;lt;/u&amp;amp;gt; &amp;amp;lt;b&amp;amp;gt;HTML&amp;amp;lt;/b&amp;amp;gt;&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;tooltip&amp;quot; data-bs-html=&amp;quot;true&amp;quot;&amp;gt; Tooltip with HTML &amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Tooltip triggered by class: &amp;lt;button class=&amp;quot;btn btn-warning&amp;quot; title=&amp;quot;Tooltip Message&amp;quot;&amp;gt;Alert!&amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
[[File:using-bootstrap-components-in-joomla-4-tooltip-demo.png|border|Tooltip Demo]]&lt;br /&gt;
&lt;br /&gt;
== Approach 2: Using a Content Plugin ==&lt;br /&gt;
&lt;br /&gt;
The steps involved:&lt;br /&gt;
&lt;br /&gt;
* Download, install and enable this plugin: https://github.com/ceford/j4xdemos-plg-bscompos/raw/master/plg_j4xdemos_bscompos.zip&lt;br /&gt;
* In the article add the text that the plugin acts on, for example {bscompos modal carousel} will trigger loading of the javascript necessary to support a modal dialog and a carousel. The plugin removes the trigger text and enclosing (now) empty &amp;amp;lt;p&amp;gt;&amp;amp;lt;/p&amp;gt; tags.&lt;br /&gt;
* Include the Bootstrap Component HTML code directly in the article or in a module included in the article. There is example HTML code below for a simple Modal and a Modal containing a Carousel. Note that this will not work if the HTML code is in a module in a template location.&lt;br /&gt;
* This will also work for a standard Custom module if the Prepare Content Option is set to Yes.&lt;br /&gt;
* Test it!&lt;br /&gt;
&lt;br /&gt;
== Approach 3: Using a Template Override ==&lt;br /&gt;
&lt;br /&gt;
The steps involved:&lt;br /&gt;
&lt;br /&gt;
* Create a mod_custom template override.&lt;br /&gt;
* Add a mod_custom module containing the component markup and trigger classes.&lt;br /&gt;
* Include the module in an article.&lt;br /&gt;
&lt;br /&gt;
=== The mod_custom template override ===&lt;br /&gt;
&lt;br /&gt;
* In the Administrator interface go to {{rarr|System, Site Templates, Cassiopeia Details and Files}}.&lt;br /&gt;
* Select {{rarr|Create Overrides, mod_custom, default.php}}.&lt;br /&gt;
* On the line following defined(&#039;_JEXEC&#039;) or die; add the following code:&lt;br /&gt;
&amp;lt;pre&amp;gt;$module_class = $params-&amp;gt;get(&#039;moduleclass_sfx&#039;);&lt;br /&gt;
if (!empty($module_class))&lt;br /&gt;
{&lt;br /&gt;
    $classes = explode(&#039; &#039;, $module_class);&lt;br /&gt;
    foreach ($classes as $class)&lt;br /&gt;
    {&lt;br /&gt;
	switch ($class)&lt;br /&gt;
        {&lt;br /&gt;
          case &#039;bs-alert&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.alert&#039;, &#039;.alert&#039;);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-button&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.button&#039;, &#039;.btn&#039;);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-carousel&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.carousel&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-collapse&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.collapse&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-dropdown&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.dropdown&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-modal&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.modal&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-offcanvas&#039;:&lt;br /&gt;
            // Not Found&lt;br /&gt;
            //\Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.offcanvas&#039;, &#039;.btn&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-popover&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.popover&#039;, &#039;.btn&#039;, []);&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.popover&#039;, &#039;a&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-scrollspy&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.scrollspy&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-tab&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.tab&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-tooltip&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.tooltip&#039;, &#039;.btn&#039;, []);&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.tooltip&#039;, &#039;a&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          case &#039;bs-toast&#039;:&lt;br /&gt;
            \Joomla\CMS\HTML\HTMLHelper::_(&#039;bootstrap.toast&#039;, &#039;.selector&#039;, []);&lt;br /&gt;
            break;&lt;br /&gt;
          default:&lt;br /&gt;
            // do nothing&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code searches for class names set in mod_custom and makes the HTMLHelper call to set up the Javascript support. Note that the last item in each call is a selector that may or may not be used to trigger action. Many of the components are triggered by data attributes in the mark-up and they do not use the selectors here. For some, the selector is needed. For example, it makes sense to use the &#039;&#039;&#039;.btn&#039;&#039;&#039; class and the &#039;&#039;&#039;a&#039;&#039;&#039; tag to trigger Tooltips.&lt;br /&gt;
&lt;br /&gt;
=== A mod_custom Module for a Modal Component ===&lt;br /&gt;
&lt;br /&gt;
* Go to {{rarr|Content, Site Modules, New}}.&lt;br /&gt;
* Select the &#039;&#039;&#039;Custom&#039;&#039;&#039; module.&lt;br /&gt;
* Fill out the form:&lt;br /&gt;
** Title: Demo Modal&lt;br /&gt;
** In the Position field type in &#039;&#039;&#039;demomodal&#039;&#039;&#039; for use in an article;&lt;br /&gt;
** Module Content: Toggle Editor for plain text entry.&lt;br /&gt;
** Paste in the following code from the Bootstrap documentation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Modal&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;!-- Button trigger modal --&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;modal&amp;quot; data-bs-target=&amp;quot;#exampleModal&amp;quot;&amp;gt; Launch demo modal &amp;lt;/button&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;!-- Modal --&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;exampleModal&amp;quot; class=&amp;quot;modal fade&amp;quot; tabindex=&amp;quot;-1&amp;quot; aria-labelledby=&amp;quot;exampleModalLabel&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;modal-dialog&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;modal-content&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-header&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;h5 id=&amp;quot;exampleModalLabel&amp;quot; class=&amp;quot;modal-title&amp;quot;&amp;gt;Modal title&amp;lt;/h5&amp;gt;&lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn-close&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;modal&amp;quot; aria-label=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-body&amp;quot;&amp;gt;&lt;br /&gt;
				...&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-footer&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn btn-secondary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;modal&amp;quot;&amp;gt;Close&amp;lt;/button&amp;gt; &lt;br /&gt;
				&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot;&amp;gt;Save changes&amp;lt;/button&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Select the Advanced tab and in the Module Class field enter &#039;&#039;&#039;bs-modal&#039;&#039;&#039;&lt;br /&gt;
** Optional: set Ttitle to Hide to use the H2 in the pasted code.&lt;br /&gt;
** Save and Close (do not worry that the modal looks all wrong in the editor).&lt;br /&gt;
&lt;br /&gt;
=== Create an Article and Menu Item ===&lt;br /&gt;
* Create a new article, Demo Modal,  and in plain text entry mode set the content to &amp;lt;pre&amp;gt;&amp;lt;div&amp;gt;{loadposition demomodal}&amp;lt;/div&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Create a Single Article menu item.&lt;br /&gt;
* Test it:&lt;br /&gt;
[[File:Demomodal.png|none|Bootstrap Modal in an Article]]&lt;br /&gt;
&lt;br /&gt;
=== A Modal Component containing a Carousel ===&lt;br /&gt;
&lt;br /&gt;
* Create a new Custom module with a new Title: Demo Modal Carousel&lt;br /&gt;
* Position: demomodalcarousel&lt;br /&gt;
* {{rarr|Advance tab, Module Class}}: bs-modal bs-carousel&lt;br /&gt;
* Module Custom content in plain text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;Modal with Carousel&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mod-custom custom&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;!-- Button trigger modal --&amp;gt; &lt;br /&gt;
	&amp;lt;button class=&amp;quot;btn btn-primary&amp;quot; type=&amp;quot;button&amp;quot; data-bs-toggle=&amp;quot;modal&amp;quot; data-bs-target=&amp;quot;#exampleModal&amp;quot;&amp;gt; Launch demo modal &amp;lt;/button&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;exampleModal&amp;quot; class=&amp;quot;modal fade&amp;quot; style=&amp;quot;display: none;&amp;quot; tabindex=&amp;quot;-1&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;modal-dialog&amp;quot; role=&amp;quot;document&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;modal-content&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-header&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;button class=&amp;quot;close&amp;quot; type=&amp;quot;button&amp;quot; data-bs-dismiss=&amp;quot;modal&amp;quot; aria-label=&amp;quot;Close&amp;quot;&amp;gt; &lt;br /&gt;
					&amp;lt;span aria-hidden=&amp;quot;true&amp;quot;&amp;gt;×&amp;lt;/span&amp;gt; &lt;br /&gt;
				&amp;lt;/button&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;div class=&amp;quot;modal-body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;div id=&amp;quot;carouselExampleCaptions&amp;quot; class=&amp;quot;carousel slide&amp;quot; data-bs-ride=&amp;quot;carousel&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;div class=&amp;quot;carousel-indicators&amp;quot;&amp;gt;&lt;br /&gt;
						&amp;lt;button class=&amp;quot;active&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;0&amp;quot; aria-current=&amp;quot;true&amp;quot; aria-label=&amp;quot;Slide 1&amp;quot;&amp;gt;&amp;lt;/button&amp;gt; &lt;br /&gt;
						&amp;lt;button type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;1&amp;quot; aria-label=&amp;quot;Slide 2&amp;quot;&amp;gt;&amp;lt;/button&amp;gt; &lt;br /&gt;
						&amp;lt;button type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide-to=&amp;quot;2&amp;quot; aria-label=&amp;quot;Slide 3&amp;quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;
					&amp;lt;/div&amp;gt;&lt;br /&gt;
					&amp;lt;div class=&amp;quot;carousel-inner&amp;quot;&amp;gt;&lt;br /&gt;
						&amp;lt;div class=&amp;quot;carousel-item active&amp;quot;&amp;gt;&lt;br /&gt;
							&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa1-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
							&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
								&amp;lt;h5&amp;gt;First slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
								&amp;lt;p&amp;gt;Some representative placeholder content for the first slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
							&amp;lt;/div&amp;gt;&lt;br /&gt;
						&amp;lt;/div&amp;gt;&lt;br /&gt;
						&amp;lt;div class=&amp;quot;carousel-item&amp;quot;&amp;gt;&lt;br /&gt;
							&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa2-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
							&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
								&amp;lt;h5&amp;gt;Second slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
								&amp;lt;p&amp;gt;Some representative placeholder content for the second slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
							&amp;lt;/div&amp;gt;&lt;br /&gt;
						&amp;lt;/div&amp;gt;&lt;br /&gt;
						&amp;lt;div class=&amp;quot;carousel-item&amp;quot;&amp;gt;&lt;br /&gt;
							&amp;lt;img class=&amp;quot;d-block w-100&amp;quot; src=&amp;quot;images/sampledata/cassiopeia/nasa3-1200.jpg&amp;quot; alt=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
							&amp;lt;div class=&amp;quot;carousel-caption d-none d-md-block&amp;quot;&amp;gt;&lt;br /&gt;
								&amp;lt;h5&amp;gt;Third slide label&amp;lt;/h5&amp;gt;&lt;br /&gt;
								&amp;lt;p&amp;gt;Some representative placeholder content for the third slide.&amp;lt;/p&amp;gt;&lt;br /&gt;
							&amp;lt;/div&amp;gt;&lt;br /&gt;
						&amp;lt;/div&amp;gt;&lt;br /&gt;
					&amp;lt;/div&amp;gt;&lt;br /&gt;
					&amp;lt;button class=&amp;quot;carousel-control-prev&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide=&amp;quot;prev&amp;quot;&amp;gt; &lt;br /&gt;
						&amp;lt;span class=&amp;quot;visually-hidden&amp;quot;&amp;gt;Previous&amp;lt;/span&amp;gt; &lt;br /&gt;
					&amp;lt;/button&amp;gt; &lt;br /&gt;
					&amp;lt;button class=&amp;quot;carousel-control-next&amp;quot; type=&amp;quot;button&amp;quot; data-bs-target=&amp;quot;#carouselExampleCaptions&amp;quot; data-bs-slide=&amp;quot;next&amp;quot;&amp;gt; &lt;br /&gt;
						&amp;lt;span class=&amp;quot;visually-hidden&amp;quot;&amp;gt;Next&amp;lt;/span&amp;gt; &lt;br /&gt;
					&amp;lt;/button&amp;gt;&lt;br /&gt;
				&amp;lt;/div&amp;gt;&lt;br /&gt;
			&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create a new Article with &amp;amp;lt;div&amp;gt;{loadposition demomodalcarousel}&amp;amp;lt;/div&amp;gt; in the content.&lt;br /&gt;
* Create a new single article menu item: Demo Modal Carousel&lt;br /&gt;
* Test it:&lt;br /&gt;
[[File:Demomodalcarousel.png|Demo Modal containing a Carousel]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Tutorials{{#translation:}}]]&lt;br /&gt;
[[Category:Plugin Development{{#translation:}}]]&lt;br /&gt;
[[Category:Development{{#translation:}}]]&lt;br /&gt;
[[Category:Joomla!_4.x{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zeus07</name></author>
	</entry>
</feed>