import { KbqContentPanelModule } from '@koobiq/components/content-panel';

KbqContentPanel

componentCopy link to KbqContentPanel
@Component({ selector: 'kbq-content-panel' })
class KbqContentPanel {}

KbqContentPanelAside

componentCopy link to KbqContentPanelAside
@Component({
    selector: 'kbq-content-panel-aside',
    exportAs: 'kbqContentPanelAside'
})
class KbqContentPanelAside {}

KbqContentPanelBody

componentCopy link to KbqContentPanelBody
@Component({
    selector: 'kbq-content-panel-body',
    exportAs: 'kbqContentPanelBody'
})
class KbqContentPanelBody {}

KbqContentPanelContainer

componentCopy link to KbqContentPanelContainer
@Component({
    selector: 'kbq-content-panel-container',
    exportAs: 'kbqContentPanelContainer'
})
class KbqContentPanelContainer {
    readonly openedInput = input<boolean | undefined>(undefined, {
        alias: 'opened'
    });
    readonly disableClose = input<boolean>(false);
    readonly disableCloseByEscape = input<boolean>(this.disableClose());
    readonly disableResizer = input<boolean>(false);
    readonly minWidth = input<number>(480);
    readonly width = input<number>(640);
    readonly maxWidth = input<number>(800);
    readonly openedChange = output<boolean>();
    readonly isOpened: Signal<boolean>;
    get hasSavedState(): boolean;
    saveState(): void;
    clearSavedState(): void;
    toggle(): void;
    open(): void;
    close(): void;
}
openedinputCopy link to openedboolean | undefined

Whether the content panel is opened. Defaults to undefined.

Bound through the opened attribute. Unset it is undefined rather than false, which is how the container tells an application that drives the panel from one that leaves it to remember its own state. Read isOpened for the state itself.

disableCloseinputCopy link to disableCloseboolean

Whether the content panel can not be closed by clicking on the close button or pressing the ESCAPE key. Defaults to false.

disableCloseByEscapeinputCopy link to disableCloseByEscapeboolean

Whether the content panel can not be closed by pressing the ESCAPE key.

disableResizerinputCopy link to disableResizerboolean

Whether the content panel resizer is disabled.

minWidthinputCopy link to minWidthnumber

Minimum width of the KbqContentPanel. Defaults to 480.

widthinputCopy link to widthnumber

Width of the KbqContentPanel. Defaults to 640.

maxWidthinputCopy link to maxWidthnumber

Max width of the KbqContentPanel. Defaults to 800.

useStateSavinginputCopy link to useStateSavingboolean

Whether the component remembers its state across reloads and restores it on the next render. Defaults to true, or to whatever KBQ_STATE_SAVING_ENABLED is provided as.

stateSavingKeyinputCopy link to stateSavingKeystring

The key the state is persisted under. While it is empty the key is derived from where the component sits in the document, which moves when the surrounding markup is restructured — an id on the component or any ancestor pins it just as well as this input does.

openedChangeoutputCopy link to openedChangeboolean

Emits event when the content panel opened state is changed.

isOpenedCopy link to isOpenedSignal<boolean>

Whether the content panel is opened.

hasSavedStateCopy link to hasSavedStateboolean

Whether state is currently persisted for this panel — restored on init, or written since. Always false while useStateSaving is unset, and false again after clearSavedState().

saveState()Copy link to saveState()void

Persists whether the panel is open and how wide it is.

Called whenever the panel is opened, closed or resized.

clearSavedState()Copy link to clearSavedState()void

Removes the state persisted for this panel.

Persistence itself stays on — the next change is written again. Unset useStateSaving to stop it.

toggle()Copy link to toggle()void

Toggles the content panel opened state.

open()Copy link to open()void

Opens the content panel.

close()Copy link to close()void

Closes the content panel.

KbqContentPanelFooter

componentCopy link to KbqContentPanelFooter
@Component({ selector: 'kbq-content-panel-footer' })
class KbqContentPanelFooter {}

KbqContentPanelHeader

componentCopy link to KbqContentPanelHeader
@Component({ selector: 'kbq-content-panel-header' })
class KbqContentPanelHeader {}
localeOverridesinputCopy link to localeOverridesKbqPartialLocaleData | undefined

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

KbqContentPanelHeaderActions

directiveCopy link to KbqContentPanelHeaderActions
@Directive({
    selector: '[kbqContentPanelHeaderActions]',
    exportAs: 'kbqContentPanelHeaderActions'
})
class KbqContentPanelHeaderActions {}

KbqContentPanelHeaderTitle

directiveCopy link to KbqContentPanelHeaderTitle
@Directive({
    selector: '[kbqContentPanelHeaderTitle]',
    exportAs: 'kbqContentPanelHeaderTitle'
})
class KbqContentPanelHeaderTitle {}

KbqContentPanelState

interfaceCopy link to KbqContentPanelState

The persisted state of a content panel — whether it was open, and how wide it was dragged.

interface KbqContentPanelState {
    opened: boolean;
    width: number;
}
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.