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 Button Group Component

Angular Button Group component allows to group a series of buttons and power them with TypeScript.

Usage

Basic example

Wrap a series of<button cButton> elements in<c-button-group> component.

Loading...
Loading...
Ensure the correctrole and provide a label

For assistive technologies (ex. screen readers) to communicate that a series of buttons are grouped, a properrole attribute has to be provided. For button groups, this should berole="group", while toolbars should have arole="toolbar".

Besides, groups and toolbars should be provided an understandable label, as most assistive technologies will otherwise not declare them, despite the appearance of the specific role attribute. In the following examples provided here, we applyaria-label, but options such asaria-labelledby can also be used.

Loading...
Loading...

Mixed styles

Loading...
Loading...

Outlined styles

Loading...
Loading...

Checkbox and radio button groups

Combine button-like checkbox and radio toggle buttons into a seamless looking button group.

Loading...
Loading...
Loading...
Loading...

Button toolbar

Join sets of button groups into button toolbars for more complicated components. Use utility classes as needed to space out groups, buttons, and more.

Loading...
Loading...

Feel free to combine input groups with button groups in your toolbars. Similar to the example above, you’ll likely need some utilities through to space items correctly.

@@
Loading...
Loading...

Sizing

Control the size of the entire button group by setting the size property on the<c-button-group> component instead of adding size to each button individually.



Loading...
Loading...

Nesting

Put a<c-dropdown> withvariant="btn-group" when you need dropdown menus combined with a series of buttons.

Loading...
Loading...

Create a set of buttons that appear vertically stacked rather than horizontally.Split button dropdowns are not supported here.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

API

ButtonGroup Module

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

c-button-group

component


Inputs

namedescriptiontypedefault
roleDefault role attr for ButtonGroup. 'group'string'group'
sizeSize the component small or large."sm" |"lg"
verticalCreate a set of buttons that appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.boolean

c-button-toolbar

component


Inputs

namedescriptiontypedefault
roleDefault role attr for ButtonToolbar.string'toolbar'

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