Html
Tabs는 페이지 안의 콘텐츠 묶음 사이를 이동하는 데 쓰는 HTML 컴포넌트예요. 기본·박스·세로·인셋·아이콘·서브 탭·가득 채움(filled) 등 다양한 스타일과, 오버플로우·내비게이션·탭 아이템 액션·현재 탭 강조 애니메이션까지 폭넓게 조합할 수 있어요.
출처: 문서
본문
예제 (Examples)
기본 (Default)
기본 탭 예제예요. (Default tabs example)
기본 탭 사용법 (Default tabs usage)
| 클래스 (Class) | 적용 대상 (Applied to) | 결과 (Outcome) |
|---|---|---|
.pf-m-disabled |
a.pf-v6-c-tabs__link |
탭 링크를 비활성 스타일로 수정해요. |
.pf-m-aria-disabled |
.pf-v6-c-tabs__link |
탭 링크를 비활성 스타일로 수정하되, 여전히 호버/포커스는 가능하게 해요. |
오버플로우 (Overflow)
목록 시작 부분의 오버플로우 (Overflow beginning of list example)
목록 시작 부분의 오버플로우 사용법 (Overflow beginning of list usage)
| 클래스 (Class) | 적용 대상 (Applied to) | 결과 (Outcome) |
|---|---|---|
.pf-m-scrollable |
.pf-v6-c-tabs |
방향 스크롤 버튼을 활성화해요. |
.pf-v6-c-tabs__scroll-button |
`` | 탭 컴포넌트의 스크롤 버튼 컨테이너를 시작해요. |
가로 오버플로우 예제 (Horizontal overflow example)
가로 오버플로우 펼침 예제 (Horizontal overflow expanded example)
가로 오버플로우 선택 예제 (Horizontal overflow selected example)
세로 (Vertical)
세로 탭 예제 (Vertical tabs example)
세로 접이식 예제 (Vertical expandable example)
세로 펼침 예제 (Vertical expanded example)
세로 접이식 반응형 예제 (Vertical expandable responsive example)
세로 접이식 예제 (deprecated) (Vertical expandable example (deprecated))
Containers
세로 펼침 예제 (deprecated) (Vertical expanded example (deprecated))
Containers
세로 접이식 반응형 예제 (deprecated) (Vertical expandable responsive example (deprecated))
Containers
박스 (Box)
박스 탭 예제 (Box tabs example)
박스 오버플로우 예제 (Box overflow example)
박스 세로 예제 (Box vertical example)
박스 탭 보조 변형 예제 (Box tabs secondary variant example)
탭 인셋 (Tab insets)
기본 탭 인셋 예제 (Default tab insets example)
박스 탭 인셋 예제 (Box tab insets example)
페이지 인셋 예제 (Page insets example)
인셋 사용법 (Insets usage)
| 클래스 (Class) | 적용 대상 (Applied to) | 결과 (Outcome) |
|---|---|---|
.pf-m-inset-{none, sm, md, lg, xl, 2xl, 3xl}{-on-[sm, md, lg, xl, 2xl]} |
.pf-v6-c-tabs |
인접한 다른 컴포넌트의 패딩과 시각적으로 일치하도록 탭 컴포넌트의 패딩/인셋을 수정해요. |
.pf-m-page-insets |
.pf-v6-c-tabs |
페이지 요소의 패딩과 시각적으로 일치하도록 탭 컴포넌트의 패딩/인셋을 수정해요. |
아이콘 (Icons)
아이콘과 텍스트 예제 (Icons and text example)
서브 탭 (Sub tabs)
서브 탭이 있는 탭 예제 (Tabs with sub tabs example)
서브 탭이 있는 박스 탭 예제 (Box tabs with sub tabs example)
가득 채움 (Filled)
가득 채운 탭 예제 (Filled tabs example)
아이콘이 있는 가득 채운 예제 (Filled with icons example)
가득 채운 박스 예제 (Filled box example)
아이콘이 있는 가득 채운 박스 예제 (Filled box with icons example)
가득 채움 사용법 (Filled usage)
| 클래스 (Class) | 적용 대상 (Applied to) | 결과 (Outcome) |
|---|---|---|
.pf-m-fill |
.pf-v6-c-tabs |
탭이 사용 가능한 공간을 가득 채우도록 수정해요. 필수예요. |
내비게이션으로서의 탭 (Tabs as navigation)
nav 요소를 사용하는 예제 (Using the nav element example)
nav 요소를 사용하는 서브 탭 예제 (Sub tabs using the nav element example)
사이트 내비게이션 변형 (Site navigation variation)
서브 내비게이션으로: (As sub navigation:)
탭 아이템 액션 (Tab item actions)
도움말 버튼 예제 (Help button example)
닫기 버튼 예제 (Close button example)
도움말·닫기 버튼 예제 (Help and close button example)
탭 추가 버튼 (Add tab button)
현재 탭 강조 애니메이션 (Animate current tab accent)
현재 탭 강조를 애니메이션하려면 .pf-v6-c-tabs 래퍼에 다음 변수를 설정해야 해요. 탭이 추가·제거·크기 조절됨에 따라 이 값들을 동적으로 갱신해야 할 수 있어요. 다음 예제들은 이 변수들에 정적 값을 사용하며 동적으로 갱신하지 않으므로 스타일 문제가 있을 수 있어요. 더 기능적인 예제는 react tabs component examples를 참고하세요.
-
--pf-v6-c-tabs--link-accent--start- 현재 탭의 왼쪽 오프셋 -
--pf-v6-c-tabs--link-accent--length- 현재 탭의 너비
기본 탭 강조 애니메이션 (Animate default tabs accent)
서브 탭 강조 애니메이션 (Animate sub tabs accent)
가득 채운 탭 강조 애니메이션 (Animate filled tabs accent)
세로 탭 강조 애니메이션 (Animate vertical tabs accent)
탭 콘텐츠 (Tab content)
기본 탭 콘텐츠 예제 (Default tab content example)
Panel 1