import { KbqFormFieldModule } from '@koobiq/components/form-field';

KbqCleaner

componentCopy link to KbqCleaner

Element to be placed in end of the form field. Resets form control by click.

@Component({ selector: 'kbq-cleaner', exportAs: 'kbqCleaner' })
class KbqCleaner extends KbqIconButton {
    readonly ariaLabel = input<string | undefined>(undefined, {
        alias: 'aria-label'
    });
    readonly size = input<KbqIconButtonSize>('normal');
    tabindex = input<number | null | undefined>();
    disabled = input<boolean | undefined>();
    readonly ariaHidden = input<boolean | undefined>(undefined, {
        alias: 'aria-hidden'
    });
    readonly iconSize = input<number | undefined>();
    autoColor = input<boolean | undefined>();
    readonly color = input<T | null | undefined>();
    hasError: boolean;
    iconName: string | undefined;
    get colorClassName(): string;
    getHostElement(): HTMLElement;
    setDefaultColor(color: T): void;
}
aria-labelinputCopy link to aria-labelstring | undefined

Accessible name of the cleaner. Defaults to the localized "Clear".

localeOverridesinputCopy link to localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

sizeinputCopy link to sizeKbqIconButtonSize

Size of the icon button.

tabindexinputCopy link to tabindexnumber | null | undefined

Position of the button in the tab order. A disabled button is taken out of it entirely.

disabledinputCopy link to disabledboolean | undefined

Whether the button is disabled.

aria-hiddeninputCopy link to aria-hiddenboolean | undefined

Whether the icon is hidden from assistive technology. Left unbound, it falls back to defaultAriaHidden, which is true for a decorative icon and false for an interactive one.

iconSizeinputCopy link to iconSizenumber | undefined

Rendered size of the icon in pixels. Left unset, the size is read from the _<px> suffix of the icon name (kbq-plus_16 โ†’ 16), which is the @koobiq/icons convention; a name without one is rendered at whatever size the surrounding styles give it.

autoColorinputCopy link to autoColorboolean | undefined

Whether the icon follows the error state of the host it sits in (a form field, for one), painting itself red while that host reports an error.

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.

hasErrorCopy link to hasErrorboolean

Whether the icon takes the error color whatever its color is. Set by a host that tints the icons it holds, such as KbqEmptyState.

iconNameCopy link to iconNamestring | undefined

Name of an icon within a @koobiq/icons. Accepts "namespace:name" syntax.

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".

KbqError

componentCopy link to KbqError

Error text to be shown below the form field control. It keeps the error color under a disabled control too.

@Component({ selector: 'kbq-error', exportAs: 'kbqError' })
class KbqError extends KbqHint {
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly fillTextOff = input<boolean>(false);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
idinputCopy link to idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

fillTextOffinputCopy link to fillTextOffboolean

Disables color for the hint text.

compactinputCopy link to compactboolean

Makes the hint size smaller.

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.

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".

KbqFieldset

componentCopy link to KbqFieldset

A group of form-fields and related controls. Container component emulating the native fieldset element.

@Component({ selector: 'kbq-fieldset', exportAs: 'kbqFieldset' })
class KbqFieldset {}

KbqFormField

componentCopy link to KbqFormField

Container for form controls that applies styling and behavior.

@Component({ selector: 'kbq-form-field', exportAs: 'kbqFormField' })
class KbqFormField extends KbqColorDirective {
    readonly noBorders = input<boolean | undefined>(
        this.defaultOptions?.noBorders
    );
    readonly inOverlay = model<boolean | undefined>(
        this.defaultOptions?.inOverlay
    );
    readonly horizontal = input<boolean | undefined>(
        this.defaultOptions?.horizontal
    );
    readonly labelClass = input<string | string[] | Set<string> | undefined>(
        this.defaultOptions?.labelClass
    );
    readonly contentClass = input<string | string[] | Set<string> | undefined>(
        this.defaultOptions?.contentClass
    );
    readonly showRequiredMarker = input<boolean>(
        !!this.defaultOptions?.showRequiredMarker
    );
    readonly color = input<T | null | undefined>();
    get invalid(): boolean;
    readonly labelId: Signal<string | null>;
    readonly isNativeLabelSupported: Signal<boolean>;
    get disabled(): boolean;
    readonly readonly: Signal<boolean>;
    get autofilled(): boolean;
    get colorClassName(): string;
    focus(options?: FocusOptions): void;
    getConnectedOverlayOrigin(): ElementRef;
    setDefaultColor(color: T): void;
}
noBordersinputCopy link to noBordersboolean | undefined

Disables form field borders and shadows.

inOverlaymodelCopy link to inOverlayboolean | undefined

Use when KbqFormField is in an overlay container.

horizontalinputCopy link to horizontalboolean | undefined

Whether the form field is displayed horizontally.

labelClassinputCopy link to labelClassstring | string[] | Set<string> | undefined

Additional CSS classes applied to the label element.

contentClassinputCopy link to contentClassstring | string[] | Set<string> | undefined

Additional CSS classes applied to the content wrapper element.

showRequiredMarkerinputCopy link to showRequiredMarkerboolean

Whether the label of a required control ends with the * marker. A control is required by its required state or by Validators.required on its form control.

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.

invalidCopy link to invalidboolean

Whether the form field is invalid.

labelIdCopy link to labelIdSignal<string | null>

Id of the rendered label, or null when the form field has no label.

for only associates a label with a native form control, so a control that is a custom element (kbq-select, for one) has to point back at the label through aria-labelledby instead.

isNativeLabelSupportedCopy link to isNativeLabelSupportedSignal<boolean>

Whether the control is a native labelable element, so that a <label> can associate with it.

A custom control (kbq-select, for one) reports isNativeLabelSupported: false; the caption is then rendered as a <span> instead of a <label>, because a label that neither has a for matching a labelable element nor wraps one is invalid, and the control is named through aria-labelledby instead.

disabledCopy link to disabledboolean

Whether the form field is disabled.

readonlyCopy link to readonlySignal<boolean>

Whether the form field control is read-only.

autofilledCopy link to autofilledboolean

Whether the form field control's value was filled in by the browser. Controls that cannot be autofilled do not implement autofilled, and report false here.

Reflected as kbq-form-field_autofilled for application code to key on. The autofill styling does not use it: CSS matches :autofill directly, in the same style pass the browser fills the field, where this arrives a frame or two later. Keeping the paint on one source also means a class left behind by a detached or re-attached control cannot tint a field the browser no longer considers autofilled.

colorClassNameCopy link to colorClassNamestring

current class name of color

focus()Copy link to focus()void

Focuses the control.

getConnectedOverlayOrigin()Copy link to getConnectedOverlayOrigin()ElementRef

Gets an ElementRef for the element that a overlay attached to the form-field should be positioned relative to.

setDefaultColor()Copy link to setDefaultColor()void

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

KbqHint

componentCopy link to KbqHint

Hint text to be shown below the form field control.

@Component({ selector: 'kbq-hint', exportAs: 'kbqHint' })
class KbqHint extends KbqColorDirective {
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly fillTextOff = input<boolean>(false);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
idinputCopy link to idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

fillTextOffinputCopy link to fillTextOffboolean

Disables color for the hint text.

compactinputCopy link to compactboolean

Makes the hint size smaller.

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.

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".

KbqPasswordToggle

componentCopy link to KbqPasswordToggle

Component which changes password visibility.

@Component({ selector: 'kbq-password-toggle', exportAs: 'kbqPasswordToggle' })
class KbqPasswordToggle extends KbqTooltipTrigger {
    readonly tabindex = input<number>(0);
    readonly kbqTooltipHidden = input<string | TemplateRef<any>>();
    readonly forDisabledComponent = input<Record<'disabledSignal', WritableSignal<boolean>>>();
    readonly ignoreTooltipPointerEvents = input<boolean>(false);
    readonly singleInstance = input<boolean>(
        inject(KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT),
        { alias: 'kbqTooltipSingleInstance' }
    );
    hideWithTimeout = input<boolean | undefined>();
    content: string | TemplateRef<any>;
    tooltipVisible: boolean;
    tooltipPlacement: KbqPopUpPlacementValues;
    relativeToPointer: boolean;
    relativeToCaret: boolean;
    relativeToCaretVertical: KbqCaretVerticalAnchor;
    tooltipPlacementPriority: string | string[] | null;
    disabled: boolean;
    enterDelay: number;
    leaveDelay: number;
    trigger: string;
    customClass: string;
    context: unknown;
    color: KbqComponentColors | string;
    arrow: boolean;
    arrowCentered: boolean;
    offset: number | null;
    readonly placementChange: EventEmitter<KbqPopUpPlacementValues>;
    readonly visibleChange: EventEmitter<boolean>;
    modifier: KbqEnumValues<TooltipModifier>;
    header: string | TemplateRef<unknown>;
    isOpen: boolean;
    get isAttached(): boolean;
    get openedChange(): Observable<boolean>;
    show(delay?: number): void;
    hide(delay?: number): void;
    showForMouseEvent(event: MouseEvent): void;
    showForElement(element: HTMLElement): void;
    updateOrigin(origin: KbqOverlayOrigin | null): void;
}
kbqTooltipHiddeninputCopy link to kbqTooltipHiddenstring | TemplateRef<any>

Tooltip shown while the password is hidden.

localeOverridesinputCopy link to localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

forDisabledComponentinputCopy link to forDisabledComponentRecord<'disabledSignal', WritableSignal<boolean>>

Input for controlling the disabled state of a component.

The input expects a component containing disabledSignal property, which is a writable signal emitting boolean values.

ignoreTooltipPointerEventsinputCopy link to ignoreTooltipPointerEventsboolean

Determines whether pointer events should be ignored on tooltips.

When set to true, the tooltip pane does not receive pointer events, so clicks and hovers pass through to whatever is underneath it. Defaults to false, which keeps the tooltip hoverable: a user who needs more time to read it โ€” or who reads at high magnification, where the pointer often ends up over the tooltip itself โ€” can move the pointer onto it without it disappearing (WCAG 1.4.13 "Content on Hover").

Set it to true for tooltips that float over other click targets, such as the overflow hints of a scrolling option list.

kbqTooltipSingleInstanceinputCopy link to kbqTooltipSingleInstanceboolean

Whether the tooltip takes part in the "only one tooltip is visible at a time" group: showing it hides the previously visible tooltip, and it is hidden when another tooltip is shown.

Defaults to true; the default can be changed application-wide with the KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT token.

Tooltips without an interactive kbqTrigger (manual, none, โ€ฆ) never take part in the group, regardless of this input โ€” they are shown imperatively and are expected to stay pinned.

hideWithTimeoutinputCopy link to hideWithTimeoutboolean | undefined

Changes hiding behavior. By default, tooltip is hidden on mouseleave from trigger. Setting hideWithTimeout to true will delay tooltip hiding and will not hide when the mouse moves from trigger to tooltip.

contentCopy link to contentstring | TemplateRef<any>

Tooltip shown while the password is visible. Reading it resolves to the tooltip matching the current visibility, so that the base trigger renders the right one.

tooltipVisibleCopy link to tooltipVisibleboolean

Input (kbqVisible) that programmatically shows or hides the tooltip; reflects the current visible state.

tooltipPlacementCopy link to tooltipPlacementKbqPopUpPlacementValues

Input (kbqPlacement) that sets the tooltip placement relative to its trigger; reflects the current placement.

relativeToPointerCopy link to relativeToPointerboolean

Positions the tooltip relative to the mouse cursor. Only available for top and bottom kbqPlacement. Does not work with kbqPlacementPriority.

relativeToCaretCopy link to relativeToCaretboolean

Positions the tooltip relative to the text caret of the field it is attached to, following it while the user types, moves the caret and scrolls the field. Anchors to the selection whenever there is one.

Every placement is available, unlike with kbqRelativeToPointer: the caret is anchored as a rectangle, so the usual fallback placements keep the tooltip on screen. Wins when both inputs are enabled.

The field is the host element itself when it is editable, otherwise the first editable it wraps.

relativeToCaretVerticalCopy link to relativeToCaretVerticalKbqCaretVerticalAnchor

What the tooltip is vertically anchored to while kbqRelativeToCaret is enabled.

tooltipPlacementPriorityCopy link to tooltipPlacementPrioritystring | string[] | null

Input (kbqPlacementPriority) that sets the ordered fallback placements; reflects the current placementPriority.

disabledCopy link to disabledboolean

Input (kbqTooltipDisabled) controlling whether the tooltip is disabled; setting it to true hides it. undefined leaves the decision to the trigger, like an unset input.

Reads back the effective state, which for triggers that derive one of their own (see derivedDisabledWins) is not necessarily the value that was written.

enterDelayCopy link to enterDelaynumber

Input (kbqEnterDelay) โ€” delay in milliseconds before the tooltip is shown. Defaults to 400.

leaveDelayCopy link to leaveDelaynumber

Input (kbqLeaveDelay) โ€” delay in milliseconds before the tooltip is hidden. Defaults to 0.

triggerCopy link to triggerstring

Input (kbqTrigger) with the comma-separated trigger events. An empty value resets to hover + focus and rebinds listeners.

customClassCopy link to customClassstring

Input (kbqTooltipClass) with an extra CSS class applied to the tooltip; updating it refreshes the class map.

contextCopy link to contextunknown

Input (kbqTooltipContext) with the context object passed to a template tooltip; updating it refreshes the open tooltip.

colorCopy link to colorKbqComponentColors | string

Input (kbqTooltipColor) with the tooltip color theme. Defaults to KbqComponentColors.Contrast.

arrowCopy link to arrowboolean

Input (kbqTooltipArrow) โ€” whether to render the tooltip's arrow/pointer. Defaults to false.

arrowCenteredCopy link to arrowCenteredboolean

Input (kbqTooltipArrowCentered) โ€” centers the arrow on the trigger while preserving the panel placement. Requires a visible arrow. Defaults to false.

offsetCopy link to offsetnumber | null

Input (kbqTooltipOffset) โ€” distance in pixels between the tooltip and its trigger. null keeps the gap of the stylesheet. Defaults to the offset of KBQ_TOOLTIP_DEFAULT_OPTIONS, when a provider in scope set one. Inside a provider scope such as the navbar's, null/undefined restores that inherited default.

placementChangeCopy link to placementChangeEventEmitter<KbqPopUpPlacementValues>

Output (kbqPlacementChange) that emits the new placement whenever the tooltip repositions.

visibleChangeCopy link to visibleChangeEventEmitter<boolean>

Output (kbqVisibleChange) that emits when the tooltip's visibility changes.

modifierCopy link to modifierKbqEnumValues<TooltipModifier>

Visual variant of the tooltip. Accepts 'default' | 'warning' | 'extended'. Replaces the removed KbqWarningTooltipTrigger and KbqExtendedTooltipTrigger subclasses โ€” to render a warning tooltip use kbqTooltipModifier="warning", and kbqTooltipModifier="extended" for the extended variant (combine with kbqTooltipHeader).

headerCopy link to headerstring | TemplateRef<unknown>

Header text or template, rendered above the tooltip content. Only meaningful with kbqTooltipModifier="extended". Replaces the removed KbqExtendedTooltipTrigger.header.

isOpenCopy link to isOpenboolean

Whether the pop-up overlay is currently open.

isAttachedCopy link to isAttachedboolean

Whether the pop-up overlay is currently attached.

Unlike isOpen, which follows the visibility of the pop-up component and therefore lags a task behind show()/hide(), this flips synchronously โ€” it is the window during which the overlay (and its backdrop) is present in the DOM. Part of the KbqSiblingPopup contract.

openedChangeCopy link to openedChangeObservable<boolean>

Emits true when the pop-up opens and false when it closes. Part of the KbqSiblingPopup contract.

show()Copy link to show()void

Shows the tooltip after delay ms. Suppresses showing while a pop-up on the same element holds the anchor or on a focus trigger that did not originate from the keyboard, and applies cursor-relative positioning when relativeToPointer is enabled.

hide()Copy link to hide()void

Hides the tooltip after delay ms and, when the user has genuinely left the host, un-mutes a tooltip that a pop-up on the same element had muted.

mouseleave and blur are the release signals because the base class binds hide to both regardless of whether the tooltip is currently visible. A pop-up that is still attached does not count: its backdrop steals the hover from the trigger while the pointer stands still, and that mouseleave must not be mistaken for the user leaving.

showForMouseEvent()Copy link to showForMouseEvent()void

Shows the tooltip next to the cursor position of the given mouse event, anchoring it to the event's currentTarget instead of the directive's own host element.

Use it when the trigger cannot be declared in the template โ€” for instance for a tooltip shared by the cells of a virtualized table. The directive still has to be created in an injection context.

showForElement()Copy link to showForElement()void

Shows the tooltip anchored to the given element instead of the directive's own host element.

Use it when the trigger cannot be declared in the template. The directive still has to be created in an injection context:

const tooltip = runInInjectionContext(injector, () => new KbqTooltipTrigger());
tooltip.showForElement(element);

Does nothing while the tooltip is disabled or has no content โ€” there is no overlay to anchor then.

updateOrigin()Copy link to updateOrigin()void

Positions the pop-up against origin โ€” an element, or a rectangle in viewport coordinates such as the one kbqCreateCaretOrigin keeps on the caret โ€” instead of the host element; null restores the host element. An open pop-up moves to the new origin at once.

This moves the position origin only. setExternalNativeElement moves the host itself, and with it the trigger's event listeners, its focus target and the scroll containers the pop-up follows.

KbqReactivePasswordHint

componentCopy link to KbqReactivePasswordHint

Password hint to be shown below the password form field control.

@Component({
    selector: 'kbq-reactive-password-hint',
    exportAs: 'kbqReactivePasswordHint'
})
class KbqReactivePasswordHint extends KbqHint {
    readonly hasError = input<boolean>(false);
    readonly fillTextOff = input<boolean>(true);
    readonly id = input<string>(`kbq-hint-${nextUniqueId++}`);
    readonly compact = input<boolean>(false);
    readonly color = input<T | null | undefined>();
    get colorClassName(): string;
    setDefaultColor(color: T): void;
}
hasErrorinputCopy link to hasErrorboolean

Whether the form field control has an error.

fillTextOffinputCopy link to fillTextOffboolean

Disables color for the hint text.

idinputCopy link to idstring

Unique ID for the hint. Referenced by the aria-describedby of the form field control.

compactinputCopy link to compactboolean

Makes the hint size smaller.

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.

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".

KbqStepper

componentCopy link to KbqStepper

Component which allow to increment or decrement number value.

@Component({ selector: 'kbq-stepper', exportAs: 'kbqStepper' })
class KbqStepper {
    readonly stepUp = output<void>();
    readonly stepDown = output<void>();
}
stepUpoutputCopy link to stepUpvoid

Emitted when the stepper is incremented.

stepDownoutputCopy link to stepDownvoid

Emitted when the stepper is decremented.

KbqFieldsetItem

directiveCopy link to KbqFieldsetItem

Directive for marking elements as items inside KbqFieldset

@Directive({ selector: '[kbqFieldsetItem]', exportAs: 'kbqFieldsetItem' })
class KbqFieldsetItem {}

KbqLabel

directiveCopy link to KbqLabel

Label for the form field.

@Directive({ selector: 'kbq-label', exportAs: 'kbqLabel' })
class KbqLabel {}

KbqLegend

directiveCopy link to KbqLegend

Directive for marking an element as legend of KbqFieldset

@Directive({ selector: '[kbqLegend]', exportAs: 'kbqLegend' })
class KbqLegend {
    readonly id = input<string>(`kbq-legend-${nextLegendUniqueId++}`);
}
idinputCopy link to idstring

Unique ID for the legend, referenced by the aria-labelledby of the fieldset.

KbqPrefix

directiveCopy link to KbqPrefix

Element to be placed in front of the form field.

@Directive({ selector: '[kbqPrefix]', exportAs: 'kbqPrefix' })
class KbqPrefix {}

KbqSuffix

directiveCopy link to KbqSuffix

Element to be placed at the end of the form field.

@Directive({ selector: '[kbqSuffix]', exportAs: 'kbqSuffix' })
class KbqSuffix {}

KbqFormFieldControl

abstract classCopy link to KbqFormFieldControl

An interface which allows a control to work inside of a KbqFormField.

Every state member is a signal: the form field derives its own state from them and runs OnPush, so a change of the control reaches it without any notification of the control's own.

abstract class KbqFormFieldControl<T> {
    readonly value: Signal<T | null>;
    readonly id: Signal<string>;
    readonly placeholder: Signal<string | null | undefined>;
    readonly ngControl: NgControl | null;
    readonly focused: Signal<boolean>;
    readonly empty: Signal<boolean>;
    readonly required: Signal<boolean>;
    readonly disabled: Signal<boolean>;
    readonly errorState: Signal<boolean>;
    readonly readonly?: Signal<boolean>;
    readonly autofilled?: Signal<boolean>;
    readonly controlType?: string;
    readonly isNativeLabelSupported?: boolean;
    setDescribedByIds?: (ids: string[]) => void;
    open?: () => void;
    abstract onContainerClick(event: MouseEvent): void;
    abstract focus(options?: FocusOptions): void;
}
valueCopy link to valueSignal<T | null>

The value of the control.

idCopy link to idSignal<string>

The element ID for this control.

placeholderCopy link to placeholderSignal<string | null | undefined>

The placeholder for this control.

ngControlCopy link to ngControlNgControl | null

Gets the NgControl for this control.

focusedCopy link to focusedSignal<boolean>

Whether the control is focused.

emptyCopy link to emptySignal<boolean>

Whether the control is empty.

requiredCopy link to requiredSignal<boolean>

Whether the control is required.

disabledCopy link to disabledSignal<boolean>

Whether the control is disabled.

errorStateCopy link to errorStateSignal<boolean>

Whether the control is in an error state.

readonlyoptionalCopy link to readonlySignal<boolean>

Whether the control is read-only: it can be focused and its value selected and copied, but not changed.

Implement it only on a control that has a read-only state. KbqFormField then hides the cleaner and adds the kbq-form-field_readonly class.

autofilledoptionalCopy link to autofilledSignal<boolean>

Whether the control's value was filled in by the browser.

Implement it only where autofill is reachable: on a control that is itself a text input or a textarea, or โ€” like KbqTagList โ€” on a wrapper that forwards the state of the input it hosts. Leave it out on controls the browser never fills.

controlTypeoptionalCopy link to controlTypestring

An optional name for the control type that can be used to distinguish kbq-form-field elements based on their control type. The form field will add a class, kbq-form-field-type-{{controlType}} to its root element.

isNativeLabelSupportedoptionalCopy link to isNativeLabelSupportedboolean

Whether the control is a native labelable element, so that the <label for> a wrapping kbq-form-field renders associates with it.

Defaults to true. A control rendered as a custom element (kbq-select, for one) sets it to false: a <label> with neither a for matching a labelable element nor a nested one is invalid, so the form field renders the caption as a <span> instead and the control is named through aria-labelledby.

setDescribedByIdsoptionalCopy link to setDescribedByIds(ids: string[]) => void

Sets the ids of the elements (hints, errors) that describe the control.

Implement it only when aria-describedby has to be placed on an element other than the one the control is declared on: KbqFormField writes the attribute on the control's host element by default.

openoptionalCopy link to open() => void

Opens control's overlay.

onContainerClick()Copy link to onContainerClick()void

Handles a click on the control's container.

focus()Copy link to focus()void

Focuses the control.

KbqFormFieldDefaultOptions

typeCopy link to KbqFormFieldDefaultOptions

Default options for the kbq-form-field that can be configured using the KBQ_FORM_FIELD_DEFAULT_OPTIONS injection token.

type KbqFormFieldDefaultOptions = Partial<{
    noBorders: boolean;
    inOverlay: boolean;
    horizontal: boolean;
    labelClass: string | string[] | Set<string>;
    contentClass: string | string[] | Set<string>;
    showRequiredMarker: boolean;
}>;
noBordersoptionalCopy link to noBordersboolean

Disables form field borders and shadows.

inOverlayoptionalCopy link to inOverlayboolean

Use when KbqFormField is in an overlay container.

horizontaloptionalCopy link to horizontalboolean

Whether the form field is displayed horizontally.

labelClassoptionalCopy link to labelClassstring | string[] | Set<string>

Additional CSS classes applied to the label element.

contentClassoptionalCopy link to contentClassstring | string[] | Set<string>

Additional CSS classes applied to the content wrapper element.

showRequiredMarkeroptionalCopy link to showRequiredMarkerboolean

Whether the label of a required control ends with the * marker.

kbqFormFieldDefaultOptionsProvider

constCopy link to kbqFormFieldDefaultOptionsProvider

Utility provider for KBQ_FORM_FIELD_DEFAULT_OPTIONS.

const kbqFormFieldDefaultOptionsProvider: (
    options: KbqFormFieldDefaultOptions
) => Provider;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.