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 Accordion Component

Build vertically collapsing accordions in combination with our Angular Collapse component.

Examples

Click the accordions below to expand/collapse the accordion content.

This is the second item's accordion body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the.accordion-body, though the transition does limit overflow.
Loading...
Loading...

Flush

Addflush to remove the defaultbackground-color, some borders, and some rounded corners to render accordionsedge-to-edge with their parent container.

Loading...
Loading...

Always open

Make accordion items stay open when another item is opened.

Loading...
Loading...

API

Accordion Module

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

c-accordion

component

Inputs

namedescriptiontypedefault
flushRemoves the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.booleanundefined
alwaysOpenMake accordion items stay open when another item is openedbooleanundefined

c-accordion-item

component

Inputs

namedescriptiontypedefault
visibleToggle an accordion item programmaticallybooleanfalse

cAccordionButton

directive

Inputs

namedescriptiontypedefault
collapsedToggles an accordion button collapsed state. Use in accordionHeaderTemplate.booleanundefined

Shared Module

cTemplateId

directive

proptypedefaultdescription
cTemplateIdstringundefinedtemplate name to render

templates:

template iddescription
accordionHeaderheader content only
accordionBodybody content only
accordionHeaderTemplateheader full template
accordionBodyTemplatebody full template

internals:

AccordionService

service

proptypedefaultdescription
itemsAccordionItemComponent[][ ]array of accordion items
alwaysOpenbooleanfalsein sync withAccordionComponent.alwaysOpen prop

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