Claude Code Plugins

Community-maintained marketplace

Feedback

portal-dropdown-components

@jhlee0409/eureka
0
0

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 Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name portal-dropdown-components
description 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.

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

When to Use

  • 드롭다운 메뉴가 overflow: hidden 컨테이너에 잘리는 경우
  • z-index 스태킹 컨텍스트 문제 해결 시
  • 스크롤 가능한 컨테이너 내 드롭다운 구현 시
  • 접근성 요구사항을 충족하는 UI 컴포넌트 개발 시