# Component Design Reference このドキュメントでは、独自性のあるコンポーネント設計のガイドラインを提供します。 ## Button Components ### 避けるべきパターン ```jsx // ❌ 汎用的すぎる ``` ### 推奨パターン #### Brutalist Button ```jsx ``` #### Organic Button ```jsx ``` #### Glassmorphic Button(控えめに使用) ```jsx ``` --- ## Card Components ### 独自性のあるカードパターン #### Overlapping Card ```jsx
{/* Background decorative element */}
{/* Main card */}
Featured

Card Title

Card description goes here.

``` #### Asymmetric Card ```jsx

Asymmetric Design

Breaking the symmetry rule.

``` --- ## Hero Sections ### 避けるべきレイアウト ``` [ Text ] [ Image ] ← 50/50の均等分割 ``` ### 推奨レイアウト #### Asymmetric Split ``` [ Text ] [ Large Image ] ← 35/65の非対称 ``` ```jsx

Breaking
Conventions

Design that stands out from the crowd.

``` #### Overlapping Elements ```jsx
{/* Background text */}

BOLD

{/* Content */}
Welcome to

Something Different

``` --- ## Navigation Patterns ### Creative Navigation Ideas #### Vertical Side Nav ```jsx ``` #### Floating Navigation ```jsx ``` --- ## Animation Patterns ### Page Load Animation ```jsx // Staggered fade-in for content sections const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1, delayChildren: 0.2, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6, ease: [0.16, 1, 0.3, 1], // ease-out-expo }, }, }; ``` ### Scroll-Triggered Animation ```jsx // Intersection Observer pattern const useScrollAnimation = () => { const ref = useRef(null); const [isVisible, setIsVisible] = useState(false); useEffect(() => { const observer = new IntersectionObserver( ([entry]) => setIsVisible(entry.isIntersecting), { threshold: 0.1, rootMargin: '-50px' }, ); if (ref.current) observer.observe(ref.current); return () => observer.disconnect(); }, []); return { ref, isVisible }; }; ``` --- ## Micro-Interactions ### Button Hover Effect ```css .button-magnetic { position: relative; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); } .button-magnetic:hover { transform: scale(1.05); } .button-magnetic::after { content: ''; position: absolute; inset: -10px; background: radial-gradient( circle at var(--x, 50%) var(--y, 50%), rgba(var(--accent-rgb), 0.15) 0%, transparent 70% ); opacity: 0; transition: opacity 0.3s; } .button-magnetic:hover::after { opacity: 1; } ``` ### Input Focus Animation ```css .input-animated { border: 2px solid transparent; background: linear-gradient(white, white) padding-box, linear-gradient(135deg, var(--primary), var(--accent)) border-box; background-size: 100% 100%, 0% 100%; background-position: 0 0, 0 100%; transition: background-size 0.3s ease; } .input-animated:focus { background-size: 100% 100%, 100% 100%; outline: none; } ```