Get StartedFoundationsComponentsPatternsRulesDevelopAI & ToolsUpdates

Reaction Button

사용자가 콘텐츠에 대한 반응을 표현할 수 있게 해주는 컴포넌트예요. 좋아요, 도움돼요 같은 감정적 피드백을 간편하게 남길 때 사용해요.

설치

pnpm dlx shadcn@latest add https://rebar.conmarket-landing.workers.dev/r/reaction-button.json

Anatomy

Reaction Button은 Container 안에 Prefix Icon, Label, Count로 구성돼요. Count는 ReactionButtonCount 로 감싸면 굵게 표시돼요.

<ReactionButton>
  <SmileIcon />
  도움돼요
  <ReactionButtonCount>1</ReactionButtonCount>
</ReactionButton>

Properties

Size

XSmall, Small 두 가지 사이즈로 제공되며 모두 Pill 형태예요. 기본값은 Small이에요.

State

Enabled, Pressed, Selected, Loading, Disabled 상태를 가져요. 선택되면 테두리와 라벨, 아이콘, 숫자가 브랜드 컬러로 바뀌어요.

Prefix Icon과 Count

반응의 의미를 나타내는 아이콘을 라벨 앞에 두고, 반응 수를 라벨 뒤에 표시할 수 있어요. 아이콘과 숫자는 필요할 때만 사용해요.

속성값기본값
sizexsmall, smallsmall
disabledtrue, falsefalse
loadingtrue, falsefalse
prefix iconicon
countnumber

Guidelines

여러 반응을 나란히 둘 때

후기나 게시글에 여러 종류의 반응을 제공할 때는 같은 사이즈의 Reaction Button을 나란히 배치해요. 사용자는 여러 반응을 동시에 선택할 수 있고, 선택하면 숫자가 바로 바뀌어요.

도움돼요 12
Do· 반응을 짧게 표현

"좋아요", "도움돼요"처럼 짧은 감정 표현을 라벨로 사용해요.

신고하기
Don't· 액션을 라벨로 사용

신고, 공유처럼 반응이 아닌 액션에는 Action Button을 사용해요.

숫자가 0일 때

반응 수가 0이면 Count를 생략하고 라벨만 보여줘도 돼요.

Props

Prop

Type

On this page