Skip to content

feat: segmentedControl#96

Merged
ryu9663 merged 2 commits intomainfrom
feat/segmentedControl
Apr 11, 2026
Merged

feat: segmentedControl#96
ryu9663 merged 2 commits intomainfrom
feat/segmentedControl

Conversation

@ryu9663
Copy link
Copy Markdown
Owner

@ryu9663 ryu9663 commented Apr 11, 2026

Summary

  • 여러 옵션 중 하나를 선택하는 세그먼트 컨트롤 컴포넌트 추가
  • Switch 컴포넌트(on/off)와 구분되는 다중 선택지 UI

Changes

컴포넌트

  • SegmentedControloptions, value, onChange, size, disabled, ariaLabel props 지원
  • 제네릭 T extends string | number — 문자열/숫자 value 모두 지원
  • 개별 옵션 단위 disabled + 전체 disabled 두 가지 레벨 지원

접근성

  • role="radiogroup" + role="radio" — WAI-ARIA Radio Group 명세 준수
  • ariaLabel prop — 그룹 용도 설명 가능
  • Roving tabindex — 선택된 버튼만 tabIndex=0, 나머지 -1
  • 키보드 내비게이션 — Home End 지원

Storybook

  • Period / ViewMode / Filter 실사용 예시 3종
  • Controls 패널에서 size, disabled, disabled options 인터랙티브 조작 가능

Test plan

  • 각 Story에서 size(small/medium/large) 전환 확인
  • Controls 패널에서 disabled / disabled options 동작 확인
  • Tab 키로 컴포넌트 진입/탈출, 화살표 키로 내부 이동 확인
  • number 타입 value 사용 시 타입 에러 없음 확인

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junyeol-components Ready Ready Preview, Comment Apr 11, 2026 8:48am

ryu9663 and others added 2 commits April 11, 2026 17:46
- role="group" → role="radiogroup" (WAI-ARIA 명세 준수)
- ariaLabel prop 추가
- T extends string → string | number (숫자 value 지원)
- roving tabindex 패턴 적용 (선택된 버튼만 tabIndex=0)
- 화살표/Home/End 키 내비게이션 구현
- onClick 내 불필요한 isDisabled 중복 체크 제거

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@ryu9663 ryu9663 force-pushed the feat/segmentedControl branch from c781f62 to 761c0af Compare April 11, 2026 08:47
@ryu9663 ryu9663 merged commit c7ad991 into main Apr 11, 2026
3 checks passed
@ryu9663 ryu9663 deleted the feat/segmentedControl branch April 11, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant