import { KbqSkeletonModule } from '@koobiq/components/skeleton';

KbqSkeletonAccordion

componentCopy link to KbqSkeletonAccordion

Placeholder of an accordion whose items have not loaded yet: collapsed items with their icon and title.

@Component({ selector: 'kbq-skeleton-accordion' })
class KbqSkeletonAccordion {
    readonly rows = input<number>(this.configuration.accordionRows);
}
rowsinputCopy link to rowsnumber

Number of collapsed items, accordionRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeletonBadge

componentCopy link to KbqSkeletonBadge

Placeholder of a badge whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-badge' })
class KbqSkeletonBadge {}

KbqSkeletonButton

componentCopy link to KbqSkeletonButton

Placeholder of a button whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-button' })
class KbqSkeletonButton {}

KbqSkeletonCheckable

componentCopy link to KbqSkeletonCheckable

Placeholder of checkboxes, radio buttons or toggles whose data has not loaded yet: the control, and the label with its hint on demand.

@Component({ selector: 'kbq-skeleton-checkable' })
class KbqSkeletonCheckable {
    readonly control = input<KbqSkeletonCheckableControl>('checkbox');
    readonly rows = input<number>(this.configuration.checkableRows);
    readonly label = input<boolean>(true);
    readonly hint = input<boolean>(false);
}
controlinputCopy link to controlKbqSkeletonCheckableControl

Control the placeholder stands in for.

rowsinputCopy link to rowsnumber

Number of controls, checkableRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

labelinputCopy link to labelboolean

Whether a control has a label.

hintinputCopy link to hintboolean

Whether the label has a hint below it.

KbqSkeletonDl

componentCopy link to KbqSkeletonDl

Placeholder of a description list whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-dl' })
class KbqSkeletonDl {
    readonly rows = input<number>(this.configuration.dlRows);
}
rowsinputCopy link to rowsnumber

Number of terms with their descriptions, dlRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeletonFormField

componentCopy link to KbqSkeletonFormField

Placeholder of a form field whose value has not loaded yet: its label, control and hint.

@Component({ selector: 'kbq-skeleton-form-field' })
class KbqSkeletonFormField {
    readonly horizontal = input<boolean>(false);
    readonly control = input<KbqSkeletonFormFieldControl>('input');
    readonly label = input<boolean>(true);
    readonly hint = input<boolean>(false);
    readonly labelClass = input<string | string[] | Set<string>>();
    readonly contentClass = input<string | string[] | Set<string>>();
}
horizontalinputCopy link to horizontalboolean

Whether the label is to the left of the control, as in a horizontal kbq-form-field.

controlinputCopy link to controlKbqSkeletonFormFieldControl

Control of the form field.

labelinputCopy link to labelboolean

Whether the form field has a label, as a kbq-form-field with kbq-label.

hintinputCopy link to hintboolean

Whether the form field has a hint below the control.

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

Classes of the label, such as the labelClass of the kbq-form-field the placeholder stands in for.

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

Classes of the control and the hint, such as the contentClass of the kbq-form-field.

KbqSkeletonGroup

componentCopy link to KbqSkeletonGroup

Row of placeholders of one kind, such as the tags of a tag list.

@Component({ selector: 'kbq-skeleton-group' })
class KbqSkeletonGroup {
    readonly preset = input.required<KbqSkeletonGroupPreset>();
    readonly count = input<number>(this.configuration.groupCount);
}
presetinputrequiredCopy link to presetKbqSkeletonGroupPreset

Placeholder of every item of the row.

countinputCopy link to countnumber

Number of placeholders, groupCount of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeletonIcon

componentCopy link to KbqSkeletonIcon

Placeholder of an icon or an icon button whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-icon' })
class KbqSkeletonIcon {}

KbqSkeletonLink

componentCopy link to KbqSkeletonLink

Placeholder of a link whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-link' })
class KbqSkeletonLink {}

KbqSkeletonTable

componentCopy link to KbqSkeletonTable

Placeholder of a table whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-table' })
class KbqSkeletonTable {
    readonly rows = input<number>(this.configuration.tableRows);
    readonly columns = input<readonly string[]>(
        equalColumns(this.configuration.tableColumns)
    );
    readonly header = input<boolean>(true);
    readonly selectable = input<boolean>(false);
    readonly pinnedColumns = input<number>(0);
}
rowsinputCopy link to rowsnumber

Number of rows below the header, tableRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

columnsinputCopy link to columnsreadonly string[]

Number of columns of equal width, tableColumns of KBQ_SKELETON_PRESETS_CONFIGURATION by default, or the width of every column as a CSS grid track, such as 160px, 1fr or auto, for a table whose columns are known.

headerinputCopy link to headerboolean

Whether the table has a header row.

selectableinputCopy link to selectableboolean

Whether every row starts with a checkbox, as in a grid whose rows can be selected.

pinnedColumnsinputCopy link to pinnedColumnsnumber

Number of columns pinned to the start and set apart from the rest by a line, as in a grid.

KbqSkeletonTabs

componentCopy link to KbqSkeletonTabs

Placeholder of tabs whose data has not loaded yet: the first tab stands out as the selected one. The content below or beside them is text, or the placeholders projected into the component.

@Component({ selector: 'kbq-skeleton-tabs' })
class KbqSkeletonTabs {
    readonly vertical = input<boolean>(false);
    readonly count = input<number>(this.configuration.tabsCount);
    readonly contentLines = input<number>(
        this.configuration.tabsContentLines
    );
}
verticalinputCopy link to verticalboolean

Whether the tabs are stacked beside the content, as in a vertical kbq-tab-group.

countinputCopy link to countnumber

Number of tabs, tabsCount of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

contentLinesinputCopy link to contentLinesnumber

Number of lines of the text that stands for the content when nothing is projected, tabsContentLines of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeletonTag

componentCopy link to KbqSkeletonTag

Placeholder of a tag whose data has not loaded yet.

@Component({ selector: 'kbq-skeleton-tag' })
class KbqSkeletonTag {}

KbqSkeletonTree

componentCopy link to KbqSkeletonTree

Placeholder of a tree whose nodes have not loaded yet, with the second node expanded.

@Component({ selector: 'kbq-skeleton-tree' })
class KbqSkeletonTree {
    readonly rows = input<number>(this.configuration.treeRows);
    readonly children = input<number>(this.configuration.treeChildren);
}
rowsinputCopy link to rowsnumber

Number of top-level nodes, treeRows of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

childreninputCopy link to childrennumber

Number of children of the expanded second node, treeChildren of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeletonTypography

componentCopy link to KbqSkeletonTypography

Placeholder of text that has not loaded yet: lines as tall as the lines of its typography level, a line of body text by default. A single line, such as a heading, is shorter than the lines of a paragraph, which differ in length.

@Component({ selector: 'kbq-skeleton-typography' })
class KbqSkeletonTypography {
    readonly level = input<string>('text-normal');
    readonly lines = input<number>(this.configuration.typographyLines);
}
levelinputCopy link to levelstring

Typography level of the text, the name of its class without kbq-, such as title or caps-compact.

linesinputCopy link to linesnumber

Number of lines, typographyLines of KBQ_SKELETON_PRESETS_CONFIGURATION by default.

KbqSkeleton

directiveCopy link to KbqSkeleton

Directive representing a skeleton placeholder.

Paints the host, children included, as one flat shape of the host's own outline with a wave running across it, and makes the host inert: it leaves the tab order and the accessibility tree until the skeleton is disabled.

@Directive({ selector: 'kbq-skeleton, [kbqSkeleton]', exportAs: 'kbqSkeleton' })
class KbqSkeleton {
    readonly enabled = input<boolean>(true, { alias: 'kbqSkeleton' });
}
kbqSkeletoninputCopy link to kbqSkeletonboolean

Whether the skeleton is enabled.

KbqSkeletonCheckableControl

typeCopy link to KbqSkeletonCheckableControl

Control a checkable placeholder stands in for.

type KbqSkeletonCheckableControl = 'checkbox' | 'radio' | 'toggle';

KbqSkeletonFormFieldControl

typeCopy link to KbqSkeletonFormFieldControl

Control a form field placeholder stands in for.

type KbqSkeletonFormFieldControl = 'input' | 'textarea';

KbqSkeletonGroupPreset

typeCopy link to KbqSkeletonGroupPreset

Placeholder a group repeats in a row.

type KbqSkeletonGroupPreset = 'button' | 'badge' | 'tag' | 'icon' | 'link';

KbqSkeletonPresetsConfiguration

interfaceCopy link to KbqSkeletonPresetsConfiguration

Numbers of items the skeleton presets show until the amount of data is known.

interface KbqSkeletonPresetsConfiguration {
    typographyLines: number;
    dlRows: number;
    tableRows: number;
    tableColumns: number;
    groupCount: number;
    accordionRows: number;
    checkableRows: number;
    tabsCount: number;
    tabsContentLines: number;
    treeRows: number;
    treeChildren: number;
}
typographyLinesCopy link to typographyLinesnumber

Number of lines of kbq-skeleton-typography.

dlRowsCopy link to dlRowsnumber

Number of rows of kbq-skeleton-dl.

tableRowsCopy link to tableRowsnumber

Number of rows of kbq-skeleton-table.

tableColumnsCopy link to tableColumnsnumber

Number of columns of kbq-skeleton-table.

groupCountCopy link to groupCountnumber

Number of placeholders of kbq-skeleton-group.

accordionRowsCopy link to accordionRowsnumber

Number of collapsed items of kbq-skeleton-accordion.

checkableRowsCopy link to checkableRowsnumber

Number of controls of kbq-skeleton-checkable.

tabsCountCopy link to tabsCountnumber

Number of tabs of kbq-skeleton-tabs.

tabsContentLinesCopy link to tabsContentLinesnumber

Number of lines of the text in the content of kbq-skeleton-tabs.

treeRowsCopy link to treeRowsnumber

Number of top-level nodes of kbq-skeleton-tree.

treeChildrenCopy link to treeChildrennumber

Number of children of the expanded node of kbq-skeleton-tree.

KBQ_SKELETON_PRESETS_CONFIGURATION

constCopy link to KBQ_SKELETON_PRESETS_CONFIGURATION

Numbers of items of the skeleton presets.

const KBQ_SKELETON_PRESETS_CONFIGURATION: InjectionToken<KbqSkeletonPresetsConfiguration>;

kbqSkeletonPresetsConfigurationProvider

constCopy link to kbqSkeletonPresetsConfigurationProvider

Utility provider for KBQ_SKELETON_PRESETS_CONFIGURATION, for an application or a part of it. The keys it leaves out keep the values of the closest provider above.

const kbqSkeletonPresetsConfigurationProvider: (
    configuration: Partial<KbqSkeletonPresetsConfiguration>
) => Provider;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.