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

Inline Edit

원문 보기 위키 갱신

Inline edit는 값과 입력이라는 두 핵심 요소를 가진 실용적인 컴포넌트예요. 값(.pf-v6-c-inline-edit__value)을 보여 줄 때는 입력(.pf-v6-c-inline-edit__input)을 숨기고, 반대로 입력을 보여 줄 때는 값을 숨기는 단순한 개념에 기반해요.

출처: 문서

본문

소개 (Introduction)

Inline edit는 .pf-v6-c-inline-edit__value와 .pf-v6-c-inline-edit__input이라는 두 핵심 요소를 가진 실용적인 컴포넌트예요. 값이 보일 때는 입력이 숨겨지고, 그 반대도 마찬가지라는 단순한 개념을 바탕으로 해요.

일반 그룹 (Generic groups)

.pf-v6-c-inline-edit__group은 기본적인 레이아웃 지원을 제공하며 여러 수정자(.pf-m-action-group, .pf-m-icon-group)를 쓸 수 있어요.

액션 (Actions)

액션(.pf-v6-c-inline-edit__action)은 기본적으로 숨겨져 있고, .pf-v6-c-inline-edit 영역이 활성화되면 표시돼요. .pf-m-enable-editable를 추가하면 액션이나 액션 그룹의 기본 표시 상태가 뒤집혀요. .pf-m-enable-editable는 요소나 요소 그룹을 편집 가능한 콘텐츠를 활성화하는 제어 주체로 표시하므로 기본적으로 보이고, 인라인 편집이 활성화되면 숨겨져요.

예제 (Examples)

인라인 편집 토글 (Inline edit toggle)

Inline edit 토글은 .pf-v6-c-inline-edit 안 어디든 배치할 수 있어요. 요소의 편집 가능 상태를 시작해요. 요소가 편집 가능해지면 토글은 숨겨져요.

인라인 편집 값 (Inline edit value)

Inline edit 값은 .pf-v6-c-inline-edit 안 어디든 배치할 수 있어요. 기본적으로 보이고, 인라인 편집이 편집 가능해지면 숨겨져요.

Static value

인라인 편집 액션 그룹 (Inline edit action group)

Inline edit action-group은 저장(save)과 취소(cancel) 액션을 담고 있으며, 인라인 편집이 편집 가능한 상태일 때만 보여요.

인라인 편집 액션 그룹 아이콘 버튼 (Inline edit action group icon buttons)

단일 인라인 편집 (기본) (Single inline edit (default))

Static value

단일 인라인 편집 (활성) (Single inline edit (active))

Static value

자유 형식 편집 (Free form edit)

Free form text

라벨이 있는 단일 인라인 편집 (기본) (Single inline edit with label (default))

Single inline edit group

Static value

유효 상태 (State valid)

Valid example

Static value

무효 상태 (State invalid)

Invalid example

Static value

인라인 편집 테이블 행 (Inline edit table row)

이 예제는 텍스트 입력, 비활성 텍스트 입력, 체크박스, 라디오, 숫자, 액션이 포함된 테이블 행에서 인라인 편집을 보여 줘요.

This is the table caption

Text input Disabled text input Checkboxes Radios Number Actions Actions
Text input description content Text input disabled, description content Check 1, Check 2 Radio 1, Radio 2 2
Text input description content Text input disabled, description content Check 1, Check 2 Radio 1, Radio 2 2

문서 (Documentation)

접근성 (Accessibility)

입력 요소에 대한 모든 접근성 요구 사항은 인라인 편집 안의 요소에도 적용돼요.

Attribute Applied to Outcome
id [labelling element] 토글 버튼 및/또는 편집 가능한 콘텐츠에 대한 참조를 제공해요.
aria-label="descriptive text" .pf-v6-c-inline-edit__toggle > button 토글 버튼에 접근 가능한 설명을 제공해요. 필수.
aria-labelledby="[labelling element] [toggle button id]" .pf-v6-c-inline-edit__toggle > button 토글 버튼에 접근 가능한 설명을 제공해요. 필수.
aria-label="descriptive text" [radio button group] 라디오 그룹에 접근 가능한 설명을 제공해요. 필수.
contenteditable="true" .pf-v6-c-inline-edit__editable-text 텍스트 노드가 편집 가능하도록 보장해요.
role="textbox" .pf-v6-c-inline-edit__editable-text 자유 형식 텍스트 입력을 허용하는 요소를 식별해요.
role="radiogroup" [radio button group] 라디오 버튼 그룹에 접근 가능한 역할을 제공해요. 필수.

사용법 (Usage)

Class Applied to Outcome
.pf-v6-c-inline-edit <div>, <span> 인라인 편집 컴포넌트를 시작해요. 필수.
.pf-v6-c-inline-edit__value * 인라인 편집 값을 시작해요. 필수.
.pf-v6-c-inline-edit__input * 인라인 편집 입력을 시작해요. 필수.
.pf-v6-c-inline-edit__editable-text * 인라인 편집 가능한 텍스트 요소를 시작해요.
.pf-v6-c-inline-edit__label * 인라인 편집 라벨을 시작해요.
.pf-v6-c-inline-edit__action * 인라인 편집 액션을 시작해요(인라인 편집 영역이 활성화될 때 보여요). 필수.
.pf-m-inline-editable .pf-v6-c-inline-edit, .pf-v6-c-inline-edit [block level element] 인라인 편집 영역을 편집 가능 상태로 수정해요.
.pf-m-action-group .pf-v6-c-inline-edit__group 그룹을 액션 그룹으로 수정해요.
.pf-m-icon-group .pf-v6-c-inline-edit__group 액션 그룹 항목 간격을 수정해요.
.pf-m-column .pf-v6-c-inline-edit__group 액션 그룹의 플렉스 방향을 수정해요.
.pf-m-footer .pf-v6-c-inline-edit__group 인라인 편집 그룹의 margin-top을 수정해요.
.pf-m-bold .pf-v6-c-inline-edit__label 인라인 편집 라벨의 font-weight를 수정해요.
.pf-m-valid .pf-v6-c-inline-edit__action 액션 버튼 상태를 수정해요.
.pf-m-enable-editable .pf-v6-c-inline-edit__action 인라인 편집 액션을 기본적으로 노출해요.

Edit this page on GitHub

더 알아보기 (Learn more)