Agent skill
portal-dropdown-components
Build React Portal-based dropdown, modal, and overlay components. Use when creating dropdown menus, select components, modals, tooltips, or any UI that needs to escape overflow containers. Includes positioning, scroll handling, keyboard navigation, and accessibility patterns.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/portal-dropdown-components
SKILL.md
Portal Dropdown Components
React Portal 기반 드롭다운, 모달, 오버레이 컴포넌트 개발 스킬입니다.
Quick Reference
Portal 기본 패턴
import { createPortal } from 'react-dom';
function Dropdown({ isOpen, position, children }) {
if (!isOpen) return null;
return createPortal(
<div style={{ position: 'fixed', ...position }}>
{children}
</div>,
document.body
);
}
핵심 기능
- ✅
position: fixed+ 화면 좌표 계산 - ✅ 외부 클릭 감지 (Click Outside)
- ✅ ESC 키 닫기
- ✅ 스크롤 시 위치 업데이트
- ✅ 포커스 트랩 (모달)
Contents
- reference.md - Portal 아키텍처 및 포지셔닝 가이드
- guide.md - 접근성 및 키보드 네비게이션 패턴
- scripts/generate_dropdown.sh - 드롭다운 컴포넌트 템플릿 생성
When to Use
- 드롭다운 메뉴가
overflow: hidden컨테이너에 잘리는 경우 - z-index 스태킹 컨텍스트 문제 해결 시
- 스크롤 가능한 컨테이너 내 드롭다운 구현 시
- 접근성 요구사항을 충족하는 UI 컴포넌트 개발 시
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?