@baneung-pack

SpotlightText

커서 주변의 글자만 밝아지고 나머지는 어두워지는 스포트라이트 효과. 다크 배경에서 가장 인상적.

라이브 미리보기

💡 위 박스 안에서 마우스를 움직여보세요. 커서 주변 글자만 밝아집니다.

기본 (다크 배경)

좁은 반경 (80px)

컬러 하이라이트 (teal)

강한 dim (거의 안 보임)

사용

import { SpotlightText } from '@baneung-pack/effect';

// 다크 배경에서 사용 권장
<SpotlightText text="HOVER ME" fontSize={32} color="#ffffff" fontWeight={800} />

// 컬러 하이라이트
<SpotlightText
  text="BANEUNG"
  highlightColor="#5BA8A0"
  color="#ffffff"
/>

// 강한 dim — 거의 안 보이다가 커서 주변만 빛남
<SpotlightText text="DARK MODE" dimOpacity={0.05} highlightColor="#FFD700" />

API

SpotlightTextProps

PropertyType기본값설명
textstring표시할 텍스트 (필수).
radiusnumber120스포트라이트 반경 (px).
dimOpacitynumber0.15어두운 영역 투명도 (0~1).
highlightColorstringcolor or currentColor스포트라이트 안 글자 색.
fontSizestring | number폰트 크기.
fontWeightCSSProperties['fontWeight']폰트 굵기.
colorstringcurrentColor베이스(dim) 텍스트 색.
classNamestring추가 클래스.
styleCSSProperties인라인 style.