Librería de botones para Angular | ng-hub-ui-buttons

Sistema completo de botones para Angular 22 con API basada en signals — botones estándar, FAB, speed dial y dropdown overlay. Sin dependencias externas más allá de ng-hub-ui-utils.

Estilos

Mixins y estilos

Override the key button 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 the component defaults. Token-based and self-contained.

Theming with hub-btn-theme
MixinParámetrosDescripción
Theming
hub-btn-theme()
$accent--hub-btn-accent
$border-radius--hub-button-border-radius
$padding-x--hub-button-padding-x
$padding-y--hub-button-padding-y
$font-size--hub-button-font-size
One-call token theming for `<hub-button>` / `[hubBtn]`

Variables CSS

Personaliza cada detalle con 52 variables CSS. Sobrescríbelas en :root o acótalas a un contenedor.

Buttons, FAB & dropdown

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.

VariablePor defectoTipoDescripción
--hub-button-border-radiusvar(--hub-sys-radius-md, 0.375rem)length Button border radius
--hub-button-border-width1.5pxlength Button border width
--hub-button-disabled-opacityvar(--hub-sys-opacity-disabled, 0.65)number Tokens de tamaño, sombra, desplazamiento y z-index del botón flotante.
--hub-button-font-sizevar(--hub-ref-font-size-base, 1rem)length Button font size
--hub-button-font-weightvar(--hub-ref-font-weight-medium, 500)number Button font weight
--hub-button-gapvar(--hub-ref-space-2, 0.5rem)length Tokens de fondo, texto y borde por variante.
--hub-button-padding-xvar(--hub-ref-space-3, 1rem)length Button padding x
--hub-button-padding-yvar(--hub-ref-space-2, 0.5rem)length Button padding y
--hub-button-spinner-size0.875emlength Button spinner size
--hub-button-spinner-duration0.7stransition Button loading spinner spin duration
--hub-button-spinnerurl("data:image/svg+xml,…")url Button loading spinner glyph (swappable SVG)
--hub-button-transitionvar(--hub-sys-transition-fast, all 0.15s ease-in-out)transition Button transition
--hub-btn-active-colorvar(--hub-btn-accent-on)color Pressed (:active) button text-color slot
--hub-btn-active-bordertransparentborder Pressed (:active) button border-color slot
--hub-btn-active-bgcolor-mix(in oklch, var(--hub-btn-accent) 70%, var(--hub-sys-color-ink, #212529))color Pressed (:active) button background slot
--hub-btn-hover-colorvar(--hub-btn-accent-emphasis)color Overridable button hover text-color slot
--hub-btn-hover-bordertransparentborder Overridable button hover border-color slot
--hub-btn-hover-bgvar(--hub-btn-accent-subtle)color Overridable button hover background slot
--hub-dropdown-item-border-radiusvar(--hub-sys-radius-sm, 0.25rem)length Dropdown item border radius
--hub-dropdown-item-disabled-opacity0.45number Dropdown item disabled opacity
--hub-dropdown-item-hover-bgvar(--hub-sys-color-surface-subtle, #f8f9fa)color Dropdown item hover bg
--hub-dropdown-item-padding-xvar(--hub-ref-space-3, 1rem)length Dropdown item padding x
--hub-dropdown-item-padding-yvar(--hub-ref-space-2, 0.5rem)length Dropdown item padding y
--hub-dropdown-panel-bgvar(--hub-sys-color-surface-default, #fff)color Dropdown panel bg
--hub-dropdown-panel-border-colorvar(--hub-sys-color-border-subtle, #dee2e6)color Dropdown panel border color
--hub-dropdown-panel-border-radiusvar(--hub-sys-radius-md, 0.375rem)length Dropdown panel border radius
--hub-dropdown-panel-max-height20remlength Dropdown panel max height
--hub-dropdown-panel-min-width11.25remlength Dropdown panel min width
--hub-dropdown-panel-padding-yvar(--hub-ref-space-1, 0.25rem)length Dropdown panel padding y
--hub-dropdown-panel-shadowvar(--hub-sys-shadow-lg, 0 1rem 3rem rgba(0, 0, 0, 0.175))shadow Dropdown panel shadow
--hub-dropdown-panel-zindexvar(--hub-sys-zindex-dropdown, 1000)number Dropdown panel z index
--hub-fab-border-radius50%length Fab border radius
--hub-fab-extended-height3.5remlength Fab extended height
--hub-fab-extended-padding-x1.25remlength Fab extended padding x
--hub-fab-extended-radius1.75remlength Fab extended radius
--hub-fab-offsetvar(--hub-ref-space-3, 1rem)length Fab offset
--hub-fab-shadowvar(--hub-sys-shadow-md, 0 0.5rem 1rem rgba(0, 0, 0, 0.15))shadow Fab shadow
--hub-fab-shadow-hovervar(--hub-sys-shadow-lg, 0 1rem 3rem rgba(0, 0, 0, 0.175))shadow Fab shadow hover
--hub-fab-size-large4.5remlength Fab size large
--hub-fab-size-mini2.5remlength Fab size mini
--hub-fab-size-standard3.5remlength Fab size standard
--hub-fab-transitionbox-shadow 0.2s ease, transform 0.15s easetransition Fab transition
--hub-fab-zindexvar(--hub-sys-zindex-fixed, 1030)number Tokens de fondo, borde, radio, sombra y hover del overlay.
--hub-speed-dial-animation0.2s easetransition Speed dial animation
--hub-speed-dial-gap0.625remlength Speed dial gap
--hub-speed-dial-zindexvar(--hub-sys-zindex-fixed, 1030)number Speed dial z index
--hub-dropdown-divider-colorvar(--hub-sys-color-border-subtle, #e2e8f0)color Background color of the dropdown divider line
--hub-speed-dial-label-bgvar(--hub-sys-color-ink, #212529)color Background of the speed-dial item label chip (tooltip-style, theme-aware)
--hub-speed-dial-label-colorvar(--hub-sys-surface-page, #ffffff)color Text color of the speed-dial item label chip
--hub-dropdown-header-colorvar(--hub-sys-color-text-subtle, #94a3b8)color Text color of a dropdown section header
--hub-dropdown-header-font-sizevar(--hub-ref-font-size-xs, 0.75rem)length Font size of a dropdown section header
--hub-dropdown-header-padding-xvar(--hub-ref-space-3, 1rem)length Horizontal padding of a dropdown section header