Bootstrap Button

Last updated

A Bootstrap button that follows your palette and icon library. Beyond links, it can open a modal or an offcanvas panel, with no code needed.

Demonstration

Palette

Outline

Sizes

Icons and disabled

Disabled

Actions

Full width

Button demo

Placeholder text. A button with its action set to Toggle Offcanvas opened this.

Bootstrap Button Settings

Action Type: Link navigates to a URL. Toggle Offcanvas / Toggle Modal open a Bootstrap Offcanvas or Bootstrap Modal block on the same page instead.

Button Link: The Link Text becomes the visible button label.

Button Text: The visible button label when the button opens an offcanvas or modal.

Offcanvas Target ID: Enter the same ID set as the target Bootstrap Offcanvas block's HTML Anchor (Advanced tab), without the # symbol.

Modal Target ID: Enter the same ID set as the target Bootstrap Modal block's HTML Anchor (Advanced tab), without the # symbol.

Variant: Uses the shared Bootstrap palette from the Customizer.

Style: Theme Default follows Customizer > Buttons > Default Button Style.

Size: Options: Default, Small, Large.

Alignment: Align the button within its block wrapper.

Full Width: Add w-100 so the button fills its parent.

Disabled: Render a non-clickable button with accessible disabled state.

Icon: Portable icons follow the Icon Library selected in the Customizer.

Icon Position: Options: Before Label, After Label.

Custom Icon Classes: Enter classes for the active provider, for example: bi bi-star or fa-solid fa-star.

Enable Advanced Classes: Replace generated variant, style, size, and width classes. The required btn class remains automatic.

Advanced Button Classes: Space-separated modifiers and utilities; do not include btn. Example: btn-outline-primary btn-lg shadow-sm.