Movatterモバイル変換


[0]ホーム

URL:


CoreUI Angular Logo
Framework:
Getting startedIntroductionSupport CoreUICustomizeSassOptionsCSS VariablesLayoutBreakpointsContainersGridColumnsGuttersFormsOverviewAutocompletePRODate PickerPRODate Range PickerPROForm ControlSelectMulti SelectPROChecks & RadiosPassword InputPRORangeRange SliderPRORatingPROStepperPROInput GroupFloating LabelsLayoutTime PickerPROValidationComponentsAccordionAlertAvatarBadgeBreadcrumbButtonButton GroupCalendarPROCalloutCardCarouselClose buttonCollapseDropdownFooterHeaderImageList GroupLoading ButtonPROModalNavNavbarOffcanvasPaginationPlaceholderPopoverProgressSmart PaginationPROSmart TablePROSidebarSpinnerTableTabsNewToastTooltipWidgetsIconsChartsTemplatesNewAdmin & DashboardDownloadInstallationCustomizeContentMigrationv4 → v5v3 → v4Angular version


DownloadHire UsGet CoreUI PRO
On this page

Angular Placeholder Component

Use Angular placeholders for your components or pages to indicate something may still be loading.

About

Placeholders can be used to enhance the experience of your application. You will, need set some custom widths totoggle their visibility. Their appearance, color, and sizing can be easily customized with our utility classes.

Example

In the example below, we take a typical card component and recreate it with placeholders applied to create a "loadingcard". Size and proportions are the same between the two.

Card title

Some quick example text to build on the card title and make up the bulk of the card's content.

Go somewhere
Placeholder

Loading...
Loading...

How it works

Create placeholders with thecPlaceholder directive and a gridcolumn cCol directive (e.g.,cCol="6") to set thewidth. They canreplace the text inside an element or be added as a modifier to an existingcomponent.

Loading...
Loading...

The useof aria-hidden="true" only indicates that the element should be hidden to screen readers. Theloadingbehavior of the placeholder depends on how authors will actually use the placeholder styles, how they plan to updatethings, etc. Some code may be needed toswap the state of the placeholder and inform users of theupdate.

Width

You can change thewidth through grid column classes, width utilities, or inline styles.

Loading...
Loading...

Color

By default, thecPlaceholder usescurrentColor. This can be overridden with a custom color or utility class.

Loading...
Loading...

Sizing

The size ofcPlaceholder are based on the typographic style ofthe parent element. Customize them withsize prop:lg,sm, orxs.

Loading...
Loading...

Animation

Animate placeholders withcPlaceholderAnimation="glow" orcPlaceholderAnimation="wave" to better convey the perception of somethingbeingactively loaded.

Loading...
Loading...

API

Placeholder Module

import { PlaceholderModule, GridModule, UtilitiesModule } from '@coreui/angular';@NgModule({   imports: [     PlaceholderModule,     GridModule,     UtilitiesModule   ]})export class AppModule() { }

cPlaceholder

directive

namedescriptiontypedefault
cPlaceholderToggle placeholder visibility.booleantrue
sizeSize the component small or large.xs | sm | lgundefined

cPlaceholderAnimation

directive

namedescriptiontypedefault
cPlaceholderAnimationAnimation type for placeholder.glow | waveundefined

CoreUI for Angular is Open Source UI Components Library for Angular.

Currently v5.5.17 Code licensed MIT, docs CC BY 3.0 .
CoreUI PRO requires acommercial license.


[8]ページ先頭

©2009-2025 Movatter.jp