Communitygithub.com

nehakanjamala/personal_website

このスキルは、「ガラスモーフィズム効果」「すりガラスUI」「Appleリキッドガラススタイル」「すりガラスカード」「半透明ガラスパネルアニメーション」「すりガラスナビバー」「ガラスモーダル/ダイアログ」「ホバー時にガラスカードをアニメーション」「屈折するリキッドガラスヒーロー」などのリクエストに対応します。backdrop-filterブラーによる半透明すりガラスパネル、エッジ/スペキュラーハイライト、SVGリキッドガラス屈折、ホバー/スクロール/表示時のモーション、アクセシブルな透明度低減フォールバックをカバーします。

personal_website とは?

このスキルは、2026年に流行する「リキッドガラス」スタイルを含む、高品質なガラスモーフィズム(すりガラス風)UIコンポーネントを作成するための包括的なガイドです。frost(frost効果)、translucency(半透明)、edge highlight(エッジハイライト)、depth(奥行き)の4つの要素を組み合わせることで、単なる半透明ボックスではなく、本物のガラスのような質感を実現します。特に、backdrop-filter、box-shadow、borderなどのCSSプロパティや、SVGフィルター(feDisplacementMapとfeTurbulence)を使用したリキッドガラスの屈折効果、ホバー/スクロール/進入時のモーションアニメーションをカバーします。対応プラットフォームはモダンブラウザ(Safariを含む)で、パフォーマンスの最適化(backdrop-filterのコスト管理)やアクセシビリティ(prefers-reduced-transparencyやprefers-reduced-motionへの対応)にも重点を置いています。スキルの成果物は、ビルド不要でブラウザで直接開ける単一のHTMLファイルであり、?state=hoverや?t=Nなどのクエリパラメータを使って任意の状態やフレームを固定し、スクリーンショットで検証できる仕組みが組み込まれています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/nehakanjamala/personal_website/tree/HEAD/.agents/skills/glassmorphism

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ガラスモーフィズム(すりガラス & リキッドガラス)

半透明のすりガラスUI:透けて見えるパネル、背景が柔らかな色として読めるようにぼかされ、明るい光のエッジで縁取られ、重なる影の上に浮かびます。2026年の「リキッドガラス」の進化形は、屈折(パネルを通して背景がはっきりと曲がって見える)と、動くスペキュラーハイライトを追加します。目標は、単なる透明度ではなく、奥行きと素材感です。

使用するタイミング

  • 賑やかな/写真の背景の上にある、すりガラスカード、ナビゲーションバー、サイドバー、モーダル/ダイアログ、ツールバー
  • ページの上に重なって見えるべきログイン/ヒーローパネルやオーバーレイ
  • Appleスタイルの「リキッドガラス」ヒーロー:ゆっくりと動き、スペキュラースイープのある屈折する表面
  • ガラス上のホバー/スクロール/進入モーション — 霜が深くなり、ハイライトが明るくなり、パネルが浮き上がる
  • コンテンツが浮かぶガラスのように見えつつ、読みやすさを保つ必要があるあらゆる場所

信頼できるガラスの4つの要素

ガラスは決して一つの性質で成立するものではありません。すべてのパネルに4つすべてが必要です。そうでなければ、ただの半透明のボックスに見えます。

  1. 霜 (Frost) — backdrop-filter: blur() に加えて saturate() で、ぼかしの中でも背景色を鮮やかに保ちます。
  2. 半透明 (Translucency) — アルファ値(約0.08〜0.18)を持つ background。完全に不透明でも、完全に透明でもありません。
  3. ガラスのエッジ (Edge of glass) — 塗りつぶしよりも 明るい ヘアラインの境界線。理想的には、左上から右下に向かって明るいハイライトがあり、縁が光を捉えます。
  4. 奥行き (Depth) — 重ねられた box-shadow:浮かせるためのアンビエントなドロップシャドウ、表面を丸く見せるための inset の上部ハイライトと下部シェード。
.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%); /* Safariには接頭辞が必要 */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),     /* 浮遊 */
    inset 0 1px 0 rgba(255, 255, 255, 0.35), /* 上部ハイライト */
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);      /* 下部シェード */
}

霜の段階:ライトUIクローム blur(8–12px) / アルファ 0.08–0.14; ヘビーモーダル/ログイン blur(24–40px) / アルファ 0.10–0.18。ダークガラス:塗りつぶし rgba(0,0,0,0.3)、よりソフトな上部ハイライト。

backdrop-filter は、要素の後ろにあるコンテンツのみをぼかします。 フラットな背景色の上では何も見えません。ガラスが効果を発揮するには、賑やかな背景(画像、グラデーション、ビデオ)が必要です。

スペキュラーエッジハイライトとアンチバンディンググレイン

フラットな境界線は死んでいます。::before を使ってマスクされた1pxのリングを角の光で描き、::after を使って opacity ≤ 0.06 の微かな feTurbulence ノイズオーバーレイでグラデーションのバンディング(強いぼかしの下での階段状の輪郭線)をディザリングします。完全なマスク境界線とインラインノイズのレシピは references/glass-recipes.md にあります。

モーション:ジオメトリではなくガラスをアニメーションさせる

ガラスの質感 — 霜が深くなる、ハイライトが明るくなる、パネルが浮き上がる — をアニメーションさせ、表面が「光に向かって傾いている」ように見せます。

.glass {
  transition: backdrop-filter .4s ease, background .4s ease,
              box-shadow .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
.glass:hover {
  backdrop-filter: blur(24px) saturate(180%);
  background: rgba(255,255,255,.18);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5);
}
  • 進入 (Entrance)(透明から霜が現れる):[data-enter] トランジションを @starting-style { backdrop-filter: blur(0); opacity: 0; transform: translateY(16px) } と組み合わせます。
  • スペキュラースイープ (Specular sweep):斜めの白いグラデーションをホバー時またはゆっくりとしたアンビエントループとして表面全体にアニメーションさせます。
  • 注意 (Caveat):ブラー半径のアニメーションはここで最も負荷が高い操作です — バックドロップは毎フレーム再ブラーされます。ホバーがカクつく場合は、transform/box-shadow/background(軽い)をアニメーションさせ、ブラーの変化量を小さく保つか、スナップさせます。

リキッドガラス — SVG屈折(2026年のルック)

厚いレンズのようにパネルを通して背景を曲げます:アニメーション化された feTurbulence から feDisplacementMap を駆動し、backdrop-filter の霜の上に重ねられた filter を介して適用します(要素自身のピクセルを歪めます)。

<svg width="0" height="0" style="position:absolute"><filter id="liquid-glass">
  <feTurbulence type="fractalNoise" baseFrequency="0.008 0.012" numOctaves="2" seed="3" result="n">
    <animate attributeName="baseFrequency" dur="18s"
             values="0.008 0.012;0.012 0.008;0.008 0.012" repeatCount="indefinite"/>
  </feTurbulence>
  <feDisplacementMap in="SourceGraphic" in2="n" scale="22" xChannelSelector="R" yChannelSelector="G"/>
</filter></svg>

scale = 屈折の強さ(8〜14は控えめ、20〜30は顕著、40以上は溶けたように)。baseFrequency が低いほど、波は大きく遅くなります(より液体らしく)。animate の dur は長く(12〜20秒)保ち、呼吸するようにします。これらのフィルターは重いです — グリッドではなく、1つのヒーロー要素にのみ使用してください。

パフォーマンス — backdrop-filter は高コスト

  • 各ガラス要素は、その後ろのすべてを再サンプリングしてぼかします。数を制限してください。画面上に12もあると、スクロールのFPSが低下します。
  • 重いガラスは独自のレイヤーに昇格させ(transform: translateZ(0) または will-change: transform)、アニメーション後に will-change を削除します。
  • backdrop-filter 要素を互いに重ねないでください — ネストされたブラーはブラーを再ブラーします(2次コスト)。
  • 広い範囲での大きな半径(>40px)は最悪のケースです。半径とパネルサイズを制限してください。

アクセシビリティ — 譲れない必須条件

ガラスは装飾です。コンテンツは読みやすく、効果は無効化可能でなければなりません。

@media (prefers-reduced-transparency: reduce) {
  .glass { background: #1a1a2e; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .glass::after { display: none; }            /* グレインを削除 */
}
@media (prefers-reduced-motion: reduce) {
  .glass { transition: none; }
  .liquid { filter: none; }                   /* 屈折の動きを停止 */
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(30,30,50,.85); }  /* 十分に不透明なフォールバック */
}

賑やかな背景上のコントラスト:写真上の半透明パネルは、テキストをWCAG以下にする可能性があります。テキストの下に半透明のスクリムまたは暗くするグラデーションを追加し、オプションで text-shadow: 0 1px 2px rgba(0,0,0,.4) を追加し、バックドロップの最も明るい領域に対してボディテキストで4.5:1以上、大きいテキストで3:1以上であることを確認します。

納品と検証(スタンドアロンHTML)

パッケージ化されたヘルパー(scripts/):scripts/seek-shot.sh anim.html 0 1.5 3 は ?t=N ハーネスをフリーズし、各瞬間をスクリーンショットします。scripts/contact-sheet.sh sheet.png frame-*.png はそれらをタイル状に並べ、一瞥でのレビューを可能にします。scripts/README.md を参照してください。

自己完結型のガラスデモ(カード、ナビ、モーダル、リキッドガラスヒーロー)の場合、成果物はブラウザで直接開ける1つのHTMLファイルです — マークアップ、CSS、そして(リキッドの場合は)インラインSVGフィルターが含まれ、ビルドステップは不要です。単一ファイルはガラス表面に適したレベルのものです。バンドラーに頼らないでください。パネルは実際の背景と重なっている必要があります(写真やグラデーションを入れてください)。そうでなければ、frostするものがなく、デモは嘘になります。

出力契約:

  • 1つの .html ファイル:賑やかな背景、ガラスマークアップ、CSS(frost + エッジハイライト + グレイン + シャドウ)、および任意のインラインSVG feDisplacementMap フィルター。
  • 解決状態 および 任意のループのフリーズフレームに着地する方法 — ガラスは状態(静止/ホバー/進入)と時間(スイープ/屈折)の両方で検証されます。
  • 任意の瞬間を検査用に固定できるように、以下のフリーズハーネスを含めてください。

シークハーネス — 決定論的な状態 + フレームを固定します。 ?state=hover はホバー時のルックを強制します。?t=N はCSSアニメーションとSVG屈折を N 秒でフリーズし、スクリーンショットが静的な決定論的フレームに着地するようにします。

<script>
  const p = new URLSearchParams(location.search);
  const state = p.get("state");
  if (state) document.documentElement.dataset.state = state;   // CSSは :root[data-state="hover"] をキーにする
  const t = p.get("t");
  if (t !== null) {
    document.getAnimations().forEach(a => { a.currentTime = parseFloat(t)*1000; a.pause(); }); // CSSスイープをフリーズ
    const svg = document.querySelector("svg");
    svg?.pauseAnimations?.(); svg?.setCurrentTime?.(parseFloat(t));                            // 屈折をフリーズ
  }
  window.__ready = true;
</script>

検証ループ — レンダリング → 状態設定/フリーズ → スクリーンショット → チェック: 各意味のある状態(?state=rest、?state=hover)とフリーズしたループフレーム(?t=2)を開き、スクリーンショットを撮り、ガラスがガラスとして読めること(ぼかしとエッジハイライトがはっきり見える、カラーバンディングがない、テキストのコントラストが背景に対して保たれている)を確認し、さらにアーティファクト(背景がフラットカラーのためボックスが平坦に見える、Safariで -webkit- 接頭辞が欠けている、屈折が強すぎる/溶けたように見える、ブラーのアニメーションによるカクつき)をチェックします。その後、prefers-reduced-transparency をロードし、不透明なフォールバックが読みやすくレンダリングされることを確認します。任意のヘッドレスツールで動作します:

npx playwright screenshot --wait-for-timeout=500 "file://$PWD/glass.html?state=hover" hover.png
npx playwright screenshot --wait-for-timeout=500 "file://$PWD/glass.html?t=2"          loop.png

フォールバックをヘッドレスでチェックするには、メディアフィーチャーをエミュレートし(例:Playwrightの --color-scheme スタイルのフラグ、またはメディアクエリをミラーリングするクラスを切り替える ?reduced=1 クエリ)、パネルが不透明で読みやすいことをスクリーンショットで確認します。

終了前に:

  1. スタンドアロンで開く — コンソールエラーなし。ガラスはフラットカラーではなく、実際の賑やかな背景と重なっている。
  2. ガラスとして読める — ぼかしと明るいエッジハイライトの両方が見え、重ねられたシャドウが浮かせ、バンディングがない(グレインが存在する)。
  3. テキストのコントラストが背景の最も明るい部分で保たれている(ボディテキスト4.5:1以上)。
  4. ?state= / ?t=N フリーズが決定論的で安定したフレームに着地する。
  5. prefers-reduced-transparency → 不透明なソリッドパネル。prefers-reduced-motion → 屈折/スイープが停止。@supports フォールバックが backdrop-filter なしの場合に対応。
  6. パフォーマンスが妥当 — ガラスの数が制限され、ブラーがカクつくパスでアニメーションされておらず、リキッド屈折は1つの要素のみ。

クイックリファレンス

ニーズアプローチ
基本のfrostbackdrop-filter: blur(16px) saturate(160%) + アルファ bg
ガラスのエッジ明るい border + マスクされた ::before の光る角のリング
浮遊 / 奥行きbox-shadow ドロップ + inset 上部ハイライト & 下部シェード
バンディング除去feTurbulence ノイズ ::after、opacity ≤ .06
ホバーモーションtransform/box-shadow/background をトランジション、小さなブラー変化量
進入@starting-style { backdrop-filter: blur(0); opacity:0 }
リキッド屈折feDisplacementMap ← アニメーション feTurbulence、filter 経由
スペキュラースイープ斜めの白いグラデーションを表面全体にアニメーション
Safari常に -webkit-backdrop-filter をペアで指定
透明度低減不透明なソリッドパネル、グレインを削除
backdrop-filter非対応@supports not (...) で十分に不透明なフォールバック

参考ファイル

  • references/glass-recipes.md — 完全なコピペレシピ:段階別のベースガラスカード、マスクされたスペキュラーエッジリング、アンチバンディンググレイン、ホバー/進入/スクロールモーション、スペキュラースイープ、調整可能なパラメータ付きSVG feDisplacementMap/feTurbulence リキッドガラスフィルター、パフォーマンスルール、透明度低減/動作低減/@supports フォールバック、コントラスト防御、スタンドアロンフリーズハーネス。

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

nehakanjamala/personal_website

This skill should be used when the user asks to "fix janky CSS animation", "make animation 60fps", "stop layout thrashing", "animate width/height/top/left smoothly", "convert animation to transform", "animate box-shadow performantly", "animate height auto", "FLIP animation", or "why is my scroll/hover animation choppy".

nehakanjamala/personal_website

This skill should be used when the user asks to "respect prefers-reduced-motion", "honor reduced motion", "make my animations accessible", "fix vestibular / motion-sickness issues", "add a useReducedMotion hook", "gate GSAP / Framer Motion / Lenis for reduced motion", or "meet WCAG 2.3.3 / C39". Provides tiered (not all-or-nothing) reduced-motion patterns in CSS and JS.

nehakanjamala/personal_website

Create, modify, debug, and deploy Apify Actors, and write their input and output schemas. Use when building an Actor from scratch, changing or troubleshooting Actor code, generating or updating .actor schema files, or pushing an Actor to the Apify platform. To wrap an existing non-Actor project, use apify-actorization instead.

nehakanjamala/personal_website

Convert existing projects into Apify Actors - serverless cloud programs. Actorize JavaScript/TypeScript (SDK with Actor.init/exit), Python (async context manager), or any language (CLI wrapper). Use when migrating code to Apify, wrapping CLI tools as Actors, or adding Actor SDK to existing projects.

nehakanjamala/personal_website

Deprecated. Output schema generation moved to the apify-actor-development skill; prefer that skill whenever it is available.

nehakanjamala/personal_website

Design and build an official Apify integration for a company's product - workflow-automation apps (Zapier/n8n-style), AI agent plugins (coding-agent skills+MCP bundles or OpenClaw/Hermes-style harnesses), AI framework packages (LangChain/LlamaIndex-style), or direct application clients via apify-client. Use when planning, creating, or reviewing an integration that exposes Apify Actors, runs, datasets, or key-value stores inside another product.

nehakanjamala/personal_website

Universal AI-powered web scraper for any platform. Scrape data from Instagram, Facebook, TikTok, YouTube, LinkedIn, X/Twitter, Google Maps, Google Search, Google Trends, Reddit, Airbnb, Yelp, and 15+ more platforms. Use for lead generation, brand monitoring, competitor analysis, influencer discovery, trend research, content analytics, audience analysis, review analysis, SEO intelligence, recruitment, or any data extraction task.

nehakanjamala/personal_website

This skill should be used when the user asks to "build a scroll animation", "add ScrollTrigger", "pin a section while scrolling", "scrub an animation to scroll", "create a hero timeline", "do a horizontal scroll section", "split text and animate words", "animate a layout change with GSAP Flip", "sync ScrollTrigger with Lenis", "Lenis smooth scroll jittery", "ScrollTrigger markers drift", "ScrollTrigger pins break with Lenis/Locomotive", or "set up smooth scroll with GSAP pinning". Covers GSAP timelines, ScrollTrigger, SplitText, Flip, and Lenis/Locomotive smooth-scroll sync for code-driven web motion.

nehakanjamala/personal_website

This skill should be used when the user asks to "add a Lottie animation", "play a .lottie or .json animation", "integrate a Bodymovin/After Effects animation on web or mobile", "control Lottie playback / segments", "make a scroll-driven Lottie", "recolor a Lottie at runtime", or "export an AE animation to Lottie". Covers dotLottie/lottie-web integration, playback control, interactivity, theming, and the AE export checklist.

nehakanjamala/personal_website

This skill should be used when the user asks to "add a hover/press effect", "animate a toggle or switch", "build an animated like button", "make a toast/snackbar slide in", "animate a drawer or modal", "animate list reordering or add/remove", "do a shared-element layout transition", or "polish UI feedback". Covers UI motion with Framer Motion (motion/react) and modern CSS.

nehakanjamala/personal_website

This skill should be used when the user asks to "animate page or route transitions", "add a page transition or crossfade between views", "animate route changes in Next.js App Router", "use the View Transitions API", "AnimatePresence exit doesn't fire on navigation", or "Framer Motion exit animation not working / exit animation before unmount in Next.js". Covers enter/exit page-transition animation with the View Transitions API and Framer Motion, for Next.js App Router and general SPA routing.

nehakanjamala/personal_website

Scrape web pages using Scrapling with anti-bot bypass (like Cloudflare Turnstile), stealth headless browsing, spiders framework, adaptive scraping, and JavaScript rendering. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Python code to scrape/crawl; or write spiders.

nehakanjamala/personal_website

This skill should be used when the user asks to "animate an SVG", "make a line draw itself on", "do a stroke draw-on / signature animation", "morph one shape into another", "move an element along a path", "animate an icon/logo", or "animate an SVG gradient or filter". Covers stroke-dashoffset draw-on, path morphing, motion-along-path, and animated icons/gradients/filters via CSS, SMIL, and GSAP.

関連スキル