import { KbqSplitButtonModule } from '@koobiq/components/split-button';

KbqSplitButton

componentCopy link to KbqSplitButton
@Component({ selector: 'kbq-split-button, [kbq-split-button]' })
class KbqSplitButton extends KbqColorDirective<KbqButtonColor> {
    readonly panelAutoWidth = input<boolean>(false);
    kbqStyle = input<KbqButtonStyleInput | null | undefined>();
    disabled = input<boolean | undefined>();
    readonly color = input<T | null | undefined>();
    get firstDisabled(): boolean;
    get secondDisabled(): boolean;
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
panelAutoWidthinputCopy link to panelAutoWidthboolean

Sets the width of the dropdown to the width of the trigger. Default is false

kbqStyleinputCopy link to kbqStyleKbqButtonStyleInput | null | undefined

Visual style of the split button, propagated to every nested button. A button that sets its own kbqStyle keeps it.

Reads back as the resulting host class rather than the value that was set, because the host [class] binding is what consumes it.

disabledinputCopy link to disabledboolean | undefined

Whether the split button is disabled. Disabling it disables every nested button; re-enabling it leaves buttons that are disabled through their own input untouched.

colorinputCopy link to 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.

firstDisabledCopy link to firstDisabledboolean

Whether the leading button is disabled.

secondDisabledCopy link to secondDisabledboolean

Whether the trailing button is disabled. Stays false while the split button holds one button.

colorClassNameCopy link to colorClassNamestring

current class name of color

setDefaultColor()Copy link to setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.