본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

ButtonGroup

원문 보기 위키 갱신

관련 있는 버튼들을 하나의 연결된 단위로 묶어주는 스타일 없는 컨테이너예요.

출처: 문서

본문

특징 (Features)

  • 여러 Button 컴포넌트를 하나의 연결된 단위로 그룹화해요
  • 표준 Button API와 함께 동작해요

사용법 (Usage)

import { Button } from 'primereact/button';
import { ButtonGroup } from 'primereact/buttongroup';
<ButtonGroup>
    <Button>Save</Button>
    <Button>Update</Button>
    <Button>Delete</Button>
</ButtonGroup>

API

ButtonGroup

Label Type Description
root ButtonGroupPassThroughType<HTMLAttributes> Used to pass attributes to the root's DOM element.

접근성 (Accessibility)

스크린 리더 (Screen Reader)

ButtonGroup은 어떤 역할(role)이나 속성도 요구하지 않아요. 각 Button이 네이티브 의미(semantics)를 유지하고, 아이콘 전용 버튼은 aria-label로 접근 가능한 이름을 제공하세요.

키보드 지원 (Keyboard Support)

그룹 안의 각 버튼은 포커스 가능하며 enter 또는 space로 활성화돼요.

더 알아보기 (Learn more)