import { KbqButtonModule } from '@koobiq/components/button';@Component({ selector: '[kbq-button]' })
class KbqButton extends KbqColorDirective<KbqButtonColor> implements KbqTitleTextRef {
kbqStyle = input<KbqButtonStyleInput | null | undefined>();
disabled = input<boolean | undefined>();
readonly color = input<T | null | undefined>();
hasFocus: boolean;
get textElement(): ElementRef<HTMLElement>;
get parentTextElement(): ElementRef<HTMLElement>;
haltDisabledEvents: (event: Event) => void;
get colorClassName(): string;
onFocus(): void;
onBlur(): void;
getHostElement(): HTMLElement;
focus(): void;
focusViaKeyboard(): void;
projectContentChanged(): void;
setDefaultColor(color: T): void;
}kbqStyleKbqButtonStyleInput | null | undefined Visual style of the button. Setting it to a value marks that value as owned by the button, so
a surrounding KbqButtonGroupRoot no longer overrides it.
Reads back as the resulting host class rather than the value that was set, because the host
[class] binding is what consumes it.
disabledboolean | undefined Whether the button is disabled. A surrounding KbqButtonGroupRoot can disable the button in
addition to this input, but never re-enables a button disabled through it.
colorT | null | undefined Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.
textElementElementRef<HTMLElement> The text box of the button, measured by kbq-title. Always rendered by the template.
parentTextElementElementRef<HTMLElement> The flex row that lays out the icons and text, used as the overflow width constraint.
colorClassNamestring current class name of color
setDefaultColor()void this color will be used as a default value. For example [color]="'' | false | undefined | null".
Groups and styling related KbqButtons into a single visual unit.
@Component({ selector: 'kbq-button-group, [kbq-button-group]' })
class KbqButtonGroup {
readonly orientation = input<KbqOrientation>('horizontal');
}orientationKbqOrientation Layout direction: 'horizontal' or 'vertical'. Defaults to 'horizontal'.
Applies the kbq-button/kbq-button-icon host class and the left/right icon modifier classes.
A button is treated as an icon button when its projected content consists only of KbqIcons
and there are at most 2 of them. When icons are mixed with other content, only the outermost
icons receive the left/right classes.
Must be used together with KbqButton (both match [kbq-button]): icon detection relies on
the .kbq-button-wrapper element rendered by the component's template.
@Directive({ selector: '[kbq-button]' })
class KbqButtonCssStyler {
readonly icons: Signal<readonly KbqIcon[]>;
readonly nativeElement: HTMLElement;
get isIconButton(): boolean;
get hasNoLabel(): boolean;
updateClassModifierForIcons(): void;
}isIconButtonboolean Whether the button contains only icons (at most 2).
hasNoLabelboolean Whether the projected label holds no text at all, e.g. an icon-only button.
This directive enhances kbq-button elements acting as dropdown triggers,
visually indicating the active state with the kbq-active class,
following Koobiq Design System.
The directive relies on a separate KbqDropdownTrigger directive to get dropdown's state.
@Directive({ selector: '[kbq-button][kbqDropdownTriggerFor]' })
class KbqButtonDropdownTrigger {
dropdownTrigger: KbqDropdownTrigger;
}Root directive that groups related buttons, propagating a shared style, color, and disabled state to every nested button
@Directive({ selector: '[kbqButtonGroupRoot]' })
class KbqButtonGroupRoot extends KbqColorDirective<KbqButtonColor> {
kbqStyle = input<KbqButtonStyleInput | null | undefined>();
disabled = input<boolean | undefined>();
readonly color = input<T | null | undefined>();
get colorClassName(): string;
setDefaultColor(color: T): void;
}kbqStyleKbqButtonStyleInput | null | undefined Style applied to the group and propagated to every nested button.
A button that sets its own kbqStyle keeps it.
disabledboolean | undefined Whether the root is disabled. Disabling the group disables every nested button; re-enabling it leaves buttons that are disabled through their own input untouched.
Stays undefined while the input is unbound so that nested buttons are not force-enabled.
colorT | null | undefined Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.
colorClassNamestring current class name of color
setDefaultColor()void this color will be used as a default value. For example [color]="'' | false | undefined | null".
Marks content to be projected into the prefix (leading) slot of a button.
@Directive({ selector: '[kbqButtonPrefix]' })
class KbqButtonPrefix {}Marks content to be projected into the suffix (trailing) slot of a button.
@Directive({ selector: '[kbqButtonSuffix]' })
class KbqButtonSuffix {}Colors a button can be rendered in, as an enum member or its plain string form.
A narrower set than KbqComponentColors: the design system pairs each color with a subset of
the styles (filled with contrast/contrast-fade, outline with theme-fade/contrast-fade,
transparent with theme/contrast), and defines no button appearance for the status colors.
A pair the design system does not define falls back to the style's default color rather than
leaving the button unstyled.
type KbqButtonColor = KbqEnumValues<
| KbqComponentColors.Theme
| KbqComponentColors.ThemeFade
| KbqComponentColors.Contrast
| KbqComponentColors.ContrastFade
>;Visual style of a button, as an enum member or its plain string form.
type KbqButtonStyle = KbqEnumValues<KbqButtonStyles>;Value accepted by the kbqStyle input: one of the built-in styles, or a custom string that is
applied verbatim as the kbq-button_<value> host class and themed by whoever sets it —
kbq-filter-bar defines its changed-filter style that way. A custom style is not covered by
kbq-button-theme() and takes the filled default color.
type KbqButtonStyleInput = KbqButtonStyle | (string & {});Visual style of a button.
enum KbqButtonStyles {
Filled = 'filled',
Outline = 'outline',
Transparent = 'transparent'
}Class set on a button host whose first visible child is an icon.
Public CSS hook: consumed by dropdown.scss to detect an icon-only dropdown trigger.
const buttonLeftIconClassName: string;Class set on a button host whose last visible child is an icon.
Public CSS hook: consumed by dropdown.scss to detect an icon-only dropdown trigger.
const buttonRightIconClassName: string;