Angular Tabs, Pills & Accordion Component | ng-hub-ui-panels

Angular content-panels component that renders as tabs, pills or an accordion, with routing, reactive forms, keyboard navigation and CSS variables.

Styles

Mixins and styles

Override the most useful `--hub-panels-*` design tokens in a single include. Every parameter is OPTIONAL and defaults to `null`: only the parameters you pass are emitted, so the rest keep their defaults. For any token not exposed here, set the `--hub-panels-*` custom property directly — this mixin is sugar for the common knobs, not a replacement for the full token surface.

Theming with hub-panels-theme
The active tab follows the themed accent.
Switch panels with a click or the arrow keys.
The pane surface picks up the themed radius.
MixinParametersDescription
Theming
hub-panels-theme()
$accent--hub-panels-accent
$border-color--hub-panels-border-color
$border-radius--hub-panels-border-radius
$border-width--hub-panels-border-width
$content-bg--hub-panels-content-bg
$content-padding-x--hub-panels-content-padding-x
$content-padding-y--hub-panels-content-padding-y
$tab-bg-active--hub-panels-tab-bg-active
$tab-color-active--hub-panels-tab-color-active
$tab-font-size--hub-panels-tab-font-size
$tab-padding-x--hub-panels-tab-padding-x
$tab-padding-y--hub-panels-tab-padding-y
$nav-gap--hub-panels-nav-gap
One-call token theming for `<hub-panels>`

CSS variables

Theme every pixel with 149 CSS variables. Override them at :root or scope them to a wrapper.

Accordion (legacy bridge)

Design tokens read by this component. Override them on the host element (or any ancestor) to customize; every default falls back to the ng-hub-ui-ds layer.

VariableDefaultTypeDescription
--hub-accordion-active-bgvar(--hub-sys-color-primary-subtle, #e7f1ff)color Active/expanded header background color
--hub-accordion-active-colorvar(--hub-sys-color-primary, #0d6efd)color Active/expanded header text color
--hub-accordion-bgvar(--hub-sys-surface-page, #fff)color Panel background color
--hub-accordion-body-padding-x1.25remlength Horizontal body padding
--hub-accordion-body-padding-yvar(--hub-ref-space-3, 1rem)length Vertical body padding
--hub-accordion-border-colorvar(--hub-sys-border-color-default, rgba(0, 0, 0, 0.125))color Panel border color
--hub-accordion-border-radiusvar(--hub-ref-radius-sm, 0.25rem)length Panel border radius
--hub-accordion-border-widthvar(--hub-ref-border-width, 1px)length Panel border width
--hub-accordion-btn-bgvar(--hub-sys-surface-page, #fff)color Header button background
--hub-accordion-btn-colorvar(--hub-sys-text-primary, #212529)color Header button text color
--hub-accordion-btn-focus-box-shadow0 0 0 var(--hub-sys-focus-ring-width, 0.25rem) var(--hub-sys-focus-ring-color, rgba(13, 110, 253, 0.25))shadow Focus ring shadow
--hub-accordion-btn-icon-maskurl("data:image/svg+xml,…")url Chevron icon mask (down by default)
--hub-accordion-btn-icon-transformrotate(-180deg)string Expanded state icon transform (up direction)
--hub-accordion-btn-icon-transitiontransform 0.2s ease-in-outtransition Icon transition
--hub-accordion-btn-icon-width1.25remlength Icon size
--hub-accordion-btn-padding-x1.25remlength Header horizontal padding
--hub-accordion-btn-padding-yvar(--hub-ref-space-3, 1rem)length Header vertical padding
--hub-accordion-collapse-transition-duration0.25stransition Collapse/expand transition duration
--hub-accordion-collapse-transition-easingcubic-bezier(0.4, 0, 0.2, 1)transition Collapse/expand transition easing
--hub-accordion-colorvar(--hub-sys-text-primary, #212529)color Panel text color
--hub-accordion-icon-active-colorvar(--hub-accordion-active-color, var(--hub-sys-color-primary, #0d6efd))color Expanded icon color
--hub-accordion-icon-colorvar(--hub-accordion-btn-color, var(--hub-sys-text-primary, #212529))color Collapsed icon color
--hub-accordion-inner-border-radiuscalc(var(--hub-accordion-border-radius, var(--hub-ref-radius-sm, 0.25rem)) - var(--hub-accordion-border-width, var(--hub-ref-border-width, 1px)))length Inner border radius
--hub-accordion-transitioncolor 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s easetransition Header visual transition

Panels

Design tokens read by this component. Override them on the host element (or any ancestor) to customize; every default falls back to the ng-hub-ui-ds layer.

VariableDefaultTypeDescription
--hub-panels-accentvar(--hub-sys-color-primary, #0d6efd)color Strip semantic accent — re-based per variant; drives every coloured affordance
--hub-panels-accent-emphasiscolor-mix(in oklch, var(--hub-panels-accent) 80%, var(--hub-sys-color-ink, #212529))color Strip accent emphasis role (hover/active text)
--hub-panels-accent-subtlecolor-mix(in oklch, var(--hub-panels-accent) 12%, var(--hub-sys-surface-page, #ffffff))color Strip accent subtle role (active accordion background)
--hub-panels-accordion-active-bgvar(--hub-accordion-active-bg, var(--hub-panels-accent-subtle))color Background of an expanded accordion header.
--hub-panels-accordion-active-colorvar(--hub-accordion-active-color, var(--hub-panels-accent-emphasis))color Text colour of an expanded accordion header.
--hub-panels-accordion-bgvar(--hub-accordion-bg, var(--hub-sys-surface-page, #fff))color Accordion view background
--hub-panels-accordion-body-padding-xvar(--hub-accordion-body-padding-x, 1.25rem)length Accordion body horizontal padding
--hub-panels-accordion-body-padding-yvar(--hub-accordion-body-padding-y, var(--hub-ref-space-3, 1rem))length Accordion body vertical padding
--hub-panels-accordion-border-colorvar(--hub-accordion-border-color, var(--hub-sys-border-color-default, #dee2e6))color Accordion border color
--hub-panels-accordion-border-radiusvar(--hub-accordion-border-radius, var(--hub-ref-radius-sm, 0.25rem))length Accordion corner radius
--hub-panels-accordion-border-widthvar(--hub-accordion-border-width, var(--hub-ref-border-width, 1px))length Accordion border width
--hub-panels-accordion-btn-bgvar(--hub-accordion-btn-bg, var(--hub-sys-surface-page, #fff))color Accordion header button background
--hub-panels-accordion-btn-colorvar(--hub-accordion-btn-color, var(--hub-sys-text-primary, #212529))color Accordion header button text color
--hub-panels-accordion-btn-focus-box-shadowvar(--hub-accordion-btn-focus-box-shadow, 0 0 0 var(--hub-sys-focus-ring-width, 0.25rem) var(--hub-sys-focus-ring-color, rgba(13, 110, 253, 0.25)))shadow Accordion header focus ring shadow
--hub-panels-accordion-btn-icon-maskvar(--hub-accordion-btn-icon-mask, url("data:image/svg+xmlurl Accordion chevron icon mask
--hub-panels-accordion-btn-icon-transformvar(--hub-accordion-btn-icon-transform, rotate(-180deg))string Transform applied to the chevron when expanded.
--hub-panels-accordion-btn-icon-transitionvar(--hub-accordion-btn-icon-transition, transform 0.2s ease-in-out)transition Accordion chevron transition
--hub-panels-accordion-btn-icon-widthvar(--hub-accordion-btn-icon-width, 1.25rem)length Accordion chevron icon size
--hub-panels-accordion-btn-padding-xvar(--hub-accordion-btn-padding-x, 1.25rem)length Horizontal padding of the disclosure button.
--hub-panels-accordion-btn-padding-yvar(--hub-accordion-btn-padding-y, var(--hub-ref-space-3, 1rem))length Vertical padding of the disclosure button.
--hub-panels-accordion-collapse-transition-durationvar(--hub-accordion-collapse-transition-duration, 0.25s)transition Duration of the expand/collapse animation.
--hub-panels-accordion-collapse-transition-easingvar(--hub-accordion-collapse-transition-easing, cubic-bezier(0.4, 0, 0.2, 1))transition Accordion collapse animation easing
--hub-panels-accordion-colorvar(--hub-accordion-color, var(--hub-sys-text-primary, #212529))color Accordion view text color
--hub-panels-accordion-icon-active-colorvar(--hub-accordion-icon-active-color, var(--hub-panels-accordion-active-color))color Accordion active chevron color
--hub-panels-accordion-icon-colorvar(--hub-accordion-icon-color, var(--hub-panels-accordion-btn-color))color Accordion chevron icon color
--hub-panels-accordion-inner-border-radiusvar(--hub-accordion-inner-border-radius, calc(var(--hub-panels-accordion-border-radius) - var(--hub-panels-accordion-border-width)))length Accordion inner corner radius
--hub-panels-accordion-toggle-guttercalc(var(--hub-panels-accordion-btn-icon-width) + var(--hub-panels-tab-gap))string Space the trailing chevron reserves at the row.s end — whatever sits last in the header (heading or actions) keeps clear of the glyph; forced to 0px when togglePosition places the chevron at the start
--hub-panels-accordion-transitionvar(--hub-accordion-transition, color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease)transition Accordion header visual transition
--hub-panels-alert-accentvar(--hub-sys-border-color-default, #dee2e6)color Alert accent stripe color
--hub-panels-alert-accent-width0.25remcolor Alert accent stripe width
--hub-panels-alert-bgvar(--hub-sys-surface-elevated, #f8f9fa)color Alert panel background
--hub-panels-alert-border-colorvar(--hub-sys-border-color-default, #dee2e6)color Alert panel border color
--hub-panels-alert-border-radiusvar(--hub-ref-radius-md, 0.375rem)length Alert panel corner radius
--hub-panels-alert-colorvar(--hub-sys-text-primary, #212529)color Alert panel text color
--hub-panels-alert-content-alignflex-startstring Alert body content cross-axis alignment (default top)
--hub-panels-alert-content-directionrowstring Alert body content flex direction (default row)
--hub-panels-alert-content-gapvar(--hub-sys-gap-2, 0.5rem)length Gap between alert body content items
--hub-panels-alert-content-justifyflex-startstring Alert body content main-axis justification
--hub-panels-alert-padding-xvar(--hub-ref-space-4, 1.5rem)length Alert panel horizontal padding
--hub-panels-alert-padding-yvar(--hub-ref-space-3, 1rem)length Alert panel vertical padding
--hub-panels-backward-btn-bgurl("data:image/svg+xml,…")url Strip backward scroll button icon
--hub-panels-border-colorvar(--hub-container-border-color, var(--hub-sys-border-color-default, #dee2e6))color Border colour of the tabs strip and content.
--hub-panels-border-radiusvar(--hub-container-border-radius, var(--hub-ref-radius-md, 0.375rem))length Corner radius of the tab headers and content.
--hub-panels-border-widthvar(--hub-container-border-width, var(--hub-ref-border-width, 1px))length Border width used by the tabs strip and active tab.
--hub-panels-body-gap0length Gap between stacked children when the card body is a flex column (fill); no-op otherwise
--hub-panels-card-accentvar(--hub-sys-border-color-default, #dee2e6)color Local accent slot for the semantic card tint ([variant]); set inline by the component
--hub-panels-card-bgvar(--hub-sys-surface-page, #fff)color Card panel background
--hub-panels-card-border-colorvar(--hub-sys-border-color-default, #dee2e6)color Card panel border color
--hub-panels-card-border-radiusvar(--hub-ref-radius-md, 0.375rem)length Card panel corner radius
--hub-panels-card-border-stylesolidborder Card panel border style (e.g. dashed for an empty-state card)
--hub-panels-card-border-widthvar(--hub-ref-border-width, 1px)length Card panel border width
--hub-panels-card-box-shadowvar(--hub-sys-shadow-sm, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075))shadow Card panel drop shadow
--hub-panels-card-colorvar(--hub-sys-text-primary, #212529)color Card panel text color
--hub-panels-card-gapvar(--hub-ref-space-3, 1rem)length Gap between stacked cards
--hub-panels-card-padding-xvar(--hub-ref-space-4, 1.5rem)length Card body horizontal padding
--hub-panels-card-padding-yvar(--hub-ref-space-3, 1rem)length Card body vertical padding
--hub-panels-content-bgvar(--hub-container-bg, var(--hub-sys-surface-page, #fff))color Background of the content area.
--hub-panels-content-box-shadownoneshadow Box shadow applied to the content area wrapper.
--hub-panels-content-padding-xvar(--hub-container-padding-x, var(--hub-ref-space-3, 1rem))length Horizontal padding of the content area.
--hub-panels-content-padding-yvar(--hub-container-padding-y, var(--hub-ref-space-3, 1rem))length Vertical padding of the content area.
--hub-panels-flex-directionrowstring Direction of the header strip relative to the content.
--hub-panels-forward-btn-bgurl("data:image/svg+xml,…")url Strip forward scroll button icon
--hub-panels-header-bgvar(--hub-panels-content-bg)color Background of the tabs/pills strip area behind inactive headers and spacer zones.
--hub-panels-nav-btn-height1.5remlength Scroll nav button height
--hub-panels-nav-btn-width1.5remlength Scroll nav button width
--hub-panels-nav-content-gapvar(--hub-ref-space-2, 0.5rem)length Gap between the pills strip and the content card (inline gap when vertical).
--hub-panels-nav-gap0length Gap between nav items
--hub-panels-nav-link-active-bgvar(--hub-panels-content-bg)color Active nav link background
--hub-panels-nav-link-active-colorvar(--hub-panels-accent)color Active nav link text color
--hub-panels-nav-link-colorvar(--hub-sys-text-primary, #212529)color Nav link text color
--hub-panels-nav-link-disabled-colorvar(--hub-sys-text-muted, #6c757d)color Disabled nav link text color
--hub-panels-nav-link-hover-colorvar(--hub-panels-accent-emphasis)color Nav link hover text color
--hub-panels-nav-link-padding-xvar(--hub-ref-space-3, 1rem)length Nav link horizontal padding
--hub-panels-nav-link-padding-yvar(--hub-ref-space-2, 0.5rem)length Nav link vertical padding
--hub-panels-pane-gap0length Gap between multiple panel blocks.
--hub-panels-pane-min-height8remlength Minimum height of each open pane in the vertical layout.
--hub-panels-pane-min-width16remlength Minimum width of each open pane before the content area scrolls horizontally.
--hub-panels-panel-footer-content-justifyflex-endstring Footer band content distribution (justify-content; the other band hooks are shared with the header)
--hub-panels-panel-header-bgvar(--hub-sys-surface-elevated, #f8f9fa)color Panel header/footer band background
--hub-panels-panel-header-border-colorvar(--hub-sys-border-color-default, #dee2e6)color Panel header/footer band border color
--hub-panels-panel-header-border-widthvar(--hub-ref-border-width, 1px)length Panel header/footer band border width
--hub-panels-panel-header-colorvar(--hub-sys-text-primary, #212529)color Panel header/footer band text color
--hub-panels-panel-header-content-aligncenterstring Header/footer band cross-axis alignment (align-items)
--hub-panels-panel-header-content-directionrowstring Header/footer band flex direction
--hub-panels-panel-header-content-gapvar(--hub-sys-gap-3, 0.75rem)length Header/footer band content gap
--hub-panels-panel-header-content-justifyflex-startstring Header band content distribution (justify-content)
--hub-panels-panel-header-font-weightvar(--hub-ref-font-weight-semibold, 600)number Panel header/footer band font weight
--hub-panels-panel-header-padding-xvar(--hub-ref-space-4, 1.5rem)length Panel header/footer horizontal padding
--hub-panels-panel-header-padding-yvar(--hub-ref-space-3, 1rem)length Panel header/footer vertical padding
--hub-panels-pill-bg-activevar(--hub-panels-accent)color Background of the active pill.
--hub-panels-pill-border-radiusvar(--hub-ref-radius-pill, 50rem)length Corner radius of pill headers.
--hub-panels-pill-color-activevar(--hub-panels-accent-on)color Text colour of the active pill.
--hub-panels-pill-content-border-width0length Border width of the pills content card; set it to the shared border width to restore a bordered pane.
--hub-panels-pill-gapvar(--hub-ref-space-2, 0.5rem)length Gap between pill headers.
--hub-panels-remove-btn-opacity0.6number Remove button resting opacity
--hub-panels-remove-btn-opacity-hover1number Remove button hover opacity
--hub-panels-strip-margin-topvar(--hub-ref-space-2, 0.5rem)length Tab strip top margin
--hub-panels-tab-active-shadow0 -0.25rem 0.5rem rgba(0, 0, 0, 0.06)shadow Elevation shadow used by the active tab in the horizontal boxed tabs view.
--hub-panels-tab-active-shadow-vertical-0.25rem 0 0.5rem rgba(0, 0, 0, 0.06)shadow Elevation shadow used by the active tab in the vertical boxed tabs view.
--hub-panels-tab-bgtransparentcolor Background of an inactive header; leave transparent to let --hub-panels-header-bg show through.
--hub-panels-tab-bg-activevar(--hub-panels-nav-link-active-bg)color Background of the active header; defaults to the content surface so the active tab fuses with the panel.
--hub-panels-tab-bg-disabledtransparentcolor Disabled tab background
--hub-panels-tab-bg-hovervar(--hub-ref-surface-2, #f8f9fa)color Background of a header on hover.
--hub-panels-tab-border-colortransparentcolor Tab border color
--hub-panels-tab-border-color-activevar(--hub-panels-accent)color Border colour of the active tab.
--hub-panels-tab-border-radiusvar(--hub-panels-border-radius)length Tab corner radius
--hub-panels-tab-border-end-radius0length Trailing-edge corner radius of the active tab
--hub-panels-tab-border-stylesolidborder Tab border style
--hub-panels-tab-border-widthvar(--hub-panels-border-width)length Tab border width
--hub-panels-tab-colorvar(--hub-panels-nav-link-color)color Text colour of an inactive header.
--hub-panels-tab-color-activevar(--hub-panels-nav-link-active-color)color Text colour of the active header.
--hub-panels-tab-color-disabledvar(--hub-panels-nav-link-disabled-color)color Disabled tab text color
--hub-panels-tab-color-hovervar(--hub-panels-nav-link-hover-color)color Tab hover text color
--hub-panels-tab-focus-ring-colorvar(--hub-sys-focus-ring-color, rgba(13, 110, 253, 0.25))color Focus ring colour for keyboard focus.
--hub-panels-tab-focus-ring-widthvar(--hub-sys-focus-ring-width, 0.25rem)length Tab focus ring width
--hub-panels-tab-font-familyvar(--hub-container-font-family, var(--hub-ref-font-family-base))string Tab label font family (inherits container)
--hub-panels-tab-font-sizevar(--hub-container-font-size, var(--hub-ref-font-size-base, 1rem))length Tab label font size (inherits container)
--hub-panels-tab-font-weightvar(--hub-ref-font-weight-medium, 500)number Font weight of the header label.
--hub-panels-tab-gapvar(--hub-ref-space-2, 0.5rem)length Gap inside tab content
--hub-panels-tab-line-heightvar(--hub-ref-line-height-base, 1.5)number Tab label line height
--hub-panels-tab-padding-xvar(--hub-panels-nav-link-padding-x)length Horizontal padding inside a header.
--hub-panels-tab-padding-yvar(--hub-panels-nav-link-padding-y)length Vertical padding inside a header.
--hub-panels-tab-transitionvar(--hub-sys-transition-base, all 0.2s ease-in-out)transition Tab state transition
--hub-tabs-gap0length Gap between tabs in the <hub-tab-nav> strip
--hub-tabs-indicator-colorvar(--hub-panels-accent, var(--hub-sys-color-primary, #0d6efd))color Active-tab underline / active-pill fill colour for <hub-tab-nav>