InlineMessage
InlineMessage은 콘텐츠 안에서 사용자가 취한 액션의 결과를 알려 주는 데 사용되는 컴포넌트입니다. Banner와 달리 액션이 발생한 곳에 아주 가까이 배치할 수 있습니다.
출처: 문서
본문
InlineMessage은 사용자가 취한 액션의 결과를 알려 줍니다. Banner와 달리 InlineMessage은 액션이 일어난 장소와 아주 가까이 있을 수 있습니다. 예: 입력 필드 아래, 버튼 옆, 테이블 안.
React 예제 (React examples)
기본 (Default)
<InlineMessage variant="unavailable">An example inline message</InlineMessage>
톤 변형 (Tone variants)
- Critical: 오류(실패한 액션, 폼 검증 오류 등)에 사용합니다.
- Warning: 잠재적 문제, 위험한 설정 변경, 연결 우려 사항에 사용합니다.
- Success: 저장된 설정 같은 완료된 액션을 확인하는 데 사용합니다.
- Unavailable: 누락된 테이블 데이터처럼 로드되지 못한 UI 부분에 사용합니다.
<Stack>
<InlineMessage variant="critical">A critical inline message</InlineMessage>
<InlineMessage variant="warning">A warning inline message</InlineMessage>
<InlineMessage variant="success">A success inline message</InlineMessage>
<InlineMessage variant="unavailable">An unavailable inline message</InlineMessage>
</Stack>
크기 변형 (Size variants)
InlineMessage는 small과 default 크기로 제공됩니다. UI 섹션에 가장 잘 맞는 크기를 선택하세요. 둘 다 맞는다면 default를 사용하세요.
<Stack>
<InlineMessage variant="critical">A default-sized inline message</InlineMessage>
<InlineMessage variant="critical" size="small">
A small-sized inline message
</InlineMessage>
</Stack>
Props
InlineMessage
| Name | Default | Description |
|---|---|---|
size |
'medium' |
'small' | 'medium' — 인라인 메시지의 크기를 지정합니다. |
variant |
Required | 'critical' | 'success' | 'unvailable' | 'warning' — 인라인 메시지의 유형을 지정합니다. |
leadingVisual |
React.ElementType | React.ReactNode — 기본 변형 아이콘 대신 표시할 커스텀 선두 비주얼 |
관련 링크 (Related links)
- 접근 가능한 알림과 메시지 (Accessible notifications and messages)
더 알아보기 (Learn more)
Banner컴포넌트와의 차이점을 확인하세요 — Baner는 액션 장소에서 더 멀리 배치됩니다.- 접근 가능한 알림과 메시지 패턴을 함께 참고하세요.
- 사용자에게 액션 결과를 전달하는 다양한 변형(critical/warning/success)을 살펴보세요.