Skip to content

Tab Pane — Reference

Reference · Advanced · Bootstrap 5

Tab Pane settings and behavior. Settings include ID, Class, Controlled By, Fade.

Look up the controls for Tab Pane and understand the markup, values and visual behavior they configure.

Single tab panel content. Place inside Tab Content; set active/fade/show states as needed.

Name Description
IDSets this element’s unique page identifier. Use a stable name such as projectSummary when another control, label or anchor must target it. Do not duplicate a static ID inside repeated markup; a component binding name and a form field’s submitted Name serve different purposes.
ClassEdits the element’s space-separated CSS class list. For example, add a project-defined class such as project-summary only when your stylesheet defines it. Preserve classes required by the component. A class name alone does not create CSS, load an extension or implement an event handler.
Controlled ByController link id for the tab pane. Connects a tab pane to its controlling tab/link. Bootstrap tabs link a trigger (with data-bs-toggle="tab" ) to a pane via href / data-bs-target and matching ids. Bootstrap docs: Tabs JS behavior Options: None Default: "". Attribute: aria-labelledby.
FadeEnables fade transition. Enables the fade transition for tab panes. Applies fade so the pane transitions when activated. Bootstrap docs: Fade effect Default: false.
ShowShows the tab pane. Controls whether the tab pane has the show state. With tabs, the pane typically uses fade + show for transitions. Bootstrap docs: Fade effect Default: false.
ActiveAdds the active class for the component’s current/selected appearance. It does not navigate, check a form input or establish application state by itself. When a route or binding manages active state, let that source determine which item is current.
Name Description
AdvancedShows the additional Text controls, including opacity, transform and overflow. This is an inspector preference stored locally, not a CSS class on the page. Enable it when you need to configure text truncation, then use the revealed control.
ColorSets a Bootstrap text-color utility. For example, text-primary applies the theme’s primary text color; text-body uses its body text color. Theme variables determine the actual color, so check both light and dark page modes. This does not change the background. Options: Primary (text-primary), Primary Emphasis (text-primary-emphasis), Secondary (text-secondary), Secondary Emphasis (text-secondary-emphasis), Success (text-success), Success Emphasis (text-success-emphasis), Danger (text-danger), Danger Emphasis (text-danger-emphasis), Warning (text-warning), Warning Emphasis (text-warning-emphasis), Info (text-info), Info Emphasis (text-info-emphasis), Light (text-light), Light Emphasis (text-light-emphasis), Dark (text-dark), Dark Emphasis (text-dark-emphasis), Body (text-body), Body Emphasis (text-body-emphasis), Body Secondary (text-body-secondary), Body Tertiary (text-body-tertiary), Black (text-black), White (text-white), Black 50 (text-black-50), White 50 (text-white-50), Muted (deprecated) (text-muted). Default: no override from this control.
Text OpacityChanges the opacity used by supported Bootstrap text-color utilities, without fading the element’s background or all its children as a single layer. For example, text-primary with text-opacity-50 renders the primary text color at 50%. A custom color that does not use --bs-text-opacity will not respond to this setting. Options: Default, 25% (text-opacity-25), 50% (text-opacity-50), 75% (text-opacity-75), 100% (text-opacity-100). Default: no override from this control.
AlignAligns text within the element’s available width. Start and End follow the writing direction; Center centers inline content. At the MD viewport, Center writes a responsive class such as text-md-center, which applies from that breakpoint upward. It does not center the element itself. Options: Start (text-start), Center (text-center), End (text-end). Default: no override from this control.
Font WeightApplies a font-weight utility to the text. For example, fw-bold requests bold text and fw-normal restores normal weight. The selected font must supply or synthesize the requested weight; this setting does not load another font file. Options: Bold (fw-bold), Bolder (fw-bolder), Normal (fw-normal), Light (fw-light), Lighter (fw-lighter).
Line HeightSets the height of each line relative to its font size. For example, lh-1 uses a line-height of 1, useful for a compact heading but often too tight for a paragraph. It changes spacing between text lines, not the margin around the element. Options: 1 (lh-1), Small (lh-sm), Base (lh-base), Large (lh-lg).
Font StyleApplies one or more text-style classes. For example, fst-italic makes text italic, lead gives an introductory paragraph the theme’s lead style, and font-monospace selects the monospace font stack. These classes style the selected element without changing its HTML tag. Options: Italic (fst-italic), Mark (mark), Lead (lead), Small (small), Monospace (font-monospace), Abbreviation (initialism).
TransformChanges the displayed letter case using CSS. For example, text-uppercase displays Product name as PRODUCT NAME while the source text stays Product name. Capitalize changes the initial letter of each word; it does not rewrite stored data. Options: Uppercase (text-uppercase), Capitalize (text-capitalize), Lowercase (text-lowercase). Default: no override from this control.
OverflowControls wrapping and overflow of text. text-nowrap prevents wrapping; text-break allows long unbroken words to wrap; text-truncate clips a single line with an ellipsis. Truncation needs a constrained width and a block or inline-block display. For example, use text-truncate on a title inside a fixed-width card. Options: Prevent wrapping (text-nowrap), Truncate text with an ellipsis (text-truncate), Word Break (text-break). Default: no override from this control.
Name Description
Back ColorSets the element’s background using Bootstrap theme utilities. bg-primary changes the background; text-bg-primary sets a primary background with a corresponding contrasting text color. For example, use text-bg-primary for a highlighted notice. Existing custom styles can override the utility. Options: Primary Contrast (text-bg-primary), Primary Background Only (bg-primary), Primary Subtle (bg-primary-subtle), Secondary Contrast (text-bg-secondary), Secondary Background Only (bg-secondary), Secondary Subtle (bg-secondary-subtle), Success Contrast (text-bg-success), Success Background Only (bg-success), Success Subtle (bg-success-subtle), Danger Contrast (text-bg-danger), Danger Background Only (bg-danger), Danger Subtle (bg-danger-subtle), Warning Contrast (text-bg-warning), Warning Background Only (bg-warning), Warning Subtle (bg-warning-subtle), Info Contrast (text-bg-info), Info Background Only (bg-info), Info Subtle (bg-info-subtle), Light Contrast (text-bg-light), Light Background Only (bg-light), Light Subtle (bg-light-subtle), Dark Contrast (text-bg-dark), Dark Background Only (bg-dark), Dark Subtle (bg-dark-subtle), Body (bg-body), Body Secondary (bg-body-secondary), Body Tertiary (bg-body-tertiary), White (bg-white), Transparent (bg-transparent). Default: no override from this control.
Back OpacityChanges the opacity of a background color that uses --bs-bg-opacity. For example, bg-primary with bg-opacity-25 gives a 25% primary background while leaving text opaque. It does not fade a background image and is separate from the whole-element Opacity control. Options: Default, 10% (bg-opacity-10), 25% (bg-opacity-25), 50% (bg-opacity-50), 75% (bg-opacity-75), 100% (bg-opacity-100). Default: no override from this control.
WidthSets a width utility relative to the containing block. For example, w-50 requests 50% of the parent’s width, while w-auto lets normal layout determine the width. This is different from a grid column span and from viewport width. Options: Auto (w-auto), 25% (w-25), 50% (w-50), 75% (w-75), 100% (w-100), Max 100% (mw-100). Default: no override from this control.
HeightSets a height utility relative to the containing block. For example, h-100 requests the parent’s full height, which needs a resolvable parent height to have the intended effect. Use auto when the content should determine height. Options: Auto (h-auto), 25% (h-25), 50% (h-50), 75% (h-75), 100% (h-100), Max 100% (mh-100). Default: no override from this control.
OpacityFades the whole rendered element, including its text, background and descendants. For example, opacity-50 makes the entire card half opaque. Opacity zero still leaves layout space and does not by itself disable clicks or remove content from assistive technologies. Options: Default, 0% (opacity-0), 25% (opacity-25), 50% (opacity-50), 75% (opacity-75), 100% (opacity-100). Default: no override from this control.
ShadowApplies or removes a Bootstrap box shadow. For example, shadow-sm gives a card the theme’s small shadow and shadow-none removes this utility’s shadow. The shadow does not allocate extra layout space; its appearance comes from the active theme variables. Options: Default, None (shadow-none), Small (shadow-sm), Regular (shadow), Large (shadow-lg). Default: no override from this control.
Object FitControls how replaced content such as an image fits an explicitly sized box. object-fit-cover fills the box and may crop the image; object-fit-contain keeps the whole image visible and may leave space. It does not size the box or control CSS background images. Options: Default, Contain (object-fit-contain), Cover (object-fit-cover), Fill (object-fit-fill), Scale Down (object-fit-scale), None (object-fit-none). Default: no override from this control.
Viewport SizeApplies viewport-relative sizing utilities. For example, vh-100 requests the full viewport height, whereas min-vh-100 allows a section to grow taller than the viewport when its content requires it. These sizes are relative to the viewport, not the parent. Options: Default, Width 100vw (vw-100), Min-Width 100vw (min-vw-100), Height 100vh (vh-100), Min-Height 100vh (min-vh-100). Default: no override from this control.
PlaceholderApplies Bootstrap placeholder styling for a loading skeleton. The placeholder class supplies the visual block, and placeholder-glow or placeholder-wave adds the corresponding effect where supported. For example, use a placeholder span while a title loads. This styling does not fetch data or automatically replace itself with the loaded content. Options: None, This Element (placeholder), Container Glow (placeholder-glow), Container Wave (placeholder-wave). Default: no override from this control.
Name Description
Margin and PaddingSets outer margin and inner padding utilities for the selected viewport breakpoint. For example, at MD, bottom margin 3 becomes mb-md-3; without a breakpoint, p-3 adds padding on every side. Start/End follow writing direction. The spacing scale comes from the project theme. Negative margin classes require a stylesheet built with negative-margin utilities enabled; the bundled default disables them. Options: mt-0, mt-1, mt-2, mt-3, mt-4, mt-5, mt-n1, mt-n2, mt-n3, mt-n4, mt-n5, mt-auto, mb-0, mb-1, mb-2, mb-3, mb-4, mb-5, mb-n1, mb-n2, mb-n3, mb-n4, mb-n5, mb-auto, ms-0, ms-1, ms-2, ms-3, ms-4, ms-5, ms-n1, ms-n2, ms-n3, ms-n4, ms-n5, ms-auto, me-0, me-1, me-2, me-3, me-4, me-5, me-n1, me-n2, me-n3, me-n4, me-n5, me-auto, mx-0, mx-1, mx-2, mx-3, mx-4, mx-5, mx-n1, mx-n2, mx-n3, mx-n4, mx-n5, mx-auto, my-0, my-1, my-2, my-3, my-4, my-5, my-n1, my-n2, my-n3, my-n4, my-n5, my-auto, m-0, m-1, m-2, m-3, m-4, m-5, m-n1, m-n2, m-n3, m-n4, m-n5, m-auto, pt-0, pt-1, pt-2, pt-3, pt-4, pt-5, pb-0, pb-1, pb-2, pb-3, pb-4, pb-5, ps-0, ps-1, ps-2, ps-3, ps-4, ps-5, pe-0, pe-1, pe-2, pe-3, pe-4, pe-5, px-0, px-1, px-2, px-3, px-4, px-5, py-0, py-1, py-2, py-3, py-4, py-5, p-0, p-1, p-2, p-3, p-4, p-5.
X GutterSets the horizontal Bootstrap row gutter through a gx-* utility. For example, gx-3 changes the spacing between columns when applied to a Bootstrap row. It works through the row and column gutter rules; adding it to an unrelated element does not create a column layout. Options: 0 (gx-0), 1 (gx-1), 2 (gx-2), 3 (gx-3), 4 (gx-4), 5 (gx-5). Default: no override from this control.
Y GutterSets the vertical Bootstrap row gutter through a gy-* utility. For example, gy-3 adds space between wrapped rows of columns. It does not replace padding inside a card or change the spacing of a non-grid element by itself. Options: 0 (gy-0), 1 (gy-1), 2 (gy-2), 3 (gy-3), 4 (gy-4), 5 (gy-5). Default: no override from this control.
Name Description
Hide onHides the element at selected viewport ranges by adding responsive display utilities. For example, hiding below MD produces d-none with a restoring display class at MD. The control uses the component’s normal display type when restoring it. This hides layout and content visually; it does not protect private data or stop a server endpoint being called. Options: Hide on mobile (xs), Hide on landscape mobile (sm), Hide on tablet (md), Hide on laptop (lg), Hide on desktop (xl), Hide on extra wide (xxl).
PrintControls whether this element appears in printed output. Hide writes d-print-none. Show restores the component’s display type for print, such as d-print-block or d-print-table-row. For example, hide a navigation bar when printing a report. Check browser print preview because screen layout alone does not show this setting. Options: Show (d-print-block), Hide (d-print-none).
Visually HiddenAdds visually-hidden: content remains available to assistive technologies while it is visually clipped. Use it for an accessible label that should not appear on screen, not for hiding private data. It is different from display:none, which also removes the element from layout and generally from the accessibility tree. Default: off.
FocusableAdds visually-hidden-focusable, which hides the element until it or a descendant receives focus. A skip link is a typical example. The element must already be focusable, such as an anchor with href; this class does not add keyboard focusability. Do not combine it with an unconditional visually-hidden class, which would keep it hidden even when focused. Default: off.

You can select a setting, apply its documented value and check the relevant effect on the page.