{"id":106,"date":"2026-02-11T09:17:01","date_gmt":"2026-02-11T00:17:01","guid":{"rendered":"https:\/\/studio-puff.com\/tech\/?p=106"},"modified":"2026-02-17T12:53:52","modified_gmt":"2026-02-17T03:53:52","slug":"better-rich","status":"publish","type":"post","link":"https:\/\/studio-puff.com\/tech\/better-rich\/","title":{"rendered":"\u300c\u3082\u3063\u3068\u30ea\u30c3\u30c1\u306b\u52d5\u304b\u3057\u3066\uff01\u300d\u3068\u30c7\u30b6\u30a4\u30ca\u30fc\u306b\u8a00\u308f\u308c\u305f\u3089\u3002Framer Motion \u00d7 Tailwind CSS\u3067\u5b9f\u88c5\u3059\u308b\u3001\u8efd\u91cf\u304b\u3064\u201c\u523a\u3055\u308b\u201d\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u8853"},"content":{"rendered":"\n<p>\u308f\u304b\u308a\u307e\u3059\u3002\u300c\u30d5\u30ef\u30c3\u300d\u3084\u300c\u30b7\u30e5\u30c3\u300d\u306e\u30cb\u30e5\u30a2\u30f3\u30b9\u3092\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3080\u306e\u304c\u6211\u3005\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u4ed5\u4e8b\u3067\u3059\u304c\u3001\u3053\u308c\u3092\u7d20\u306eCSS\uff08<code>transition<\/code>\u3084<code>@keyframes<\/code>\uff09\u3060\u3051\u3067\u518d\u73fe\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001<code>cubic-bezier<\/code>\u306e\u6570\u5024\u8abf\u6574\u5730\u7344\u306b\u9665\u3063\u305f\u308a\u3001\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u304c\u8457\u3057\u304f\u4e0b\u304c\u3063\u305f\u308a\u3057\u304c\u3061\u3067\u3059\u3002\u304b\u3068\u3044\u3063\u3066\u3001GSAP\uff08GreenSock\uff09\u3092\u5c0e\u5165\u3059\u308b\u306e\u306f\u30e9\u30a4\u30bb\u30f3\u30b9\u3084\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306e\u89b3\u70b9\u3067\u300c\u3061\u3087\u3063\u3068\u5927\u639b\u304b\u308a\u3059\u304e\u308b\u306a\u2026\u300d\u3068\u8e8a\u8e87\u3059\u308b\u30b1\u30fc\u30b9\u3082\u591a\u3044\u306f\u305a\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u4eca\u56de\u3001\u79c1\u305f\u3061\u304c\u6700\u8fd1\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u300c\u3053\u308c\u304c\u6700\u9069\u89e3\u3060\uff01\u300d\u3068\u78ba\u4fe1\u3057\u305f\u6280\u8853\u30b9\u30bf\u30c3\u30af\u3001<strong>Next.js (App Router) \u00d7 Tailwind CSS \u00d7 Framer Motion<\/strong> \u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3064\u3044\u3066\u3001\u73fe\u5834\u306e\u77e5\u898b\u3092\u4f59\u3059\u3068\u3053\u308d\u306a\u304f\u5171\u6709\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5358\u306a\u308b\u4f7f\u3044\u65b9\u306e\u89e3\u8aac\u3060\u3051\u3067\u306a\u304f\u3001\u79c1\u305f\u3061\u304c\u5b9f\u969b\u306b\u672c\u756a\u74b0\u5883\u3067\u8e0f\u307f\u629c\u3044\u305f**\u300cHydration\u30a8\u30e9\u30fc\uff08\u753b\u9762\u304c\u771f\u3063\u767d\u306b\u306a\u308b\u73fe\u8c61\uff09\u300d\u306e\u56de\u907f\u7b56**\u307e\u3067\u6df1\u6398\u308a\u3057\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u6700\u5f8c\u307e\u3067\u304a\u4ed8\u304d\u5408\u3044\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u306a\u305c\u4eca\u3001Framer Motion \u00d7 Tailwind CSS \u306a\u306e\u304b\uff1f\uff08\u6280\u8853\u9078\u5b9a\u306e\u7406\u7531\uff09<\/h2>\n\n\n\n<p>\u6280\u8853\u9078\u5b9a\u306b\u304a\u3044\u3066\u300c\u6d41\u884c\u3063\u3066\u3044\u308b\u304b\u3089\u300d\u306f\u7406\u7531\u306b\u306a\u308a\u307e\u305b\u3093\u3002\u79c1\u305f\u3061\u304c\u3053\u306e\u30b9\u30bf\u30c3\u30af\u3092\u63a1\u7528\u3057\u305f\u7406\u7531\u306f\u3001\u660e\u78ba\u306b**\u300c\u4fdd\u5b88\u6027\u300d<strong>\u3068<\/strong>\u300c\u8868\u73fe\u529b\u300d**\u306e\u30d0\u30e9\u30f3\u30b9\u304c\u30ba\u30d0\u629c\u3051\u3066\u826f\u304b\u3063\u305f\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Tailwind CSS\u306e\u300c\u30af\u30e9\u30b9\u5730\u7344\u300d\u3092\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306b\u6301\u3061\u8fbc\u307e\u306a\u3044<\/h3>\n\n\n\n<p>Tailwind CSS\u306f\u7d20\u6674\u3089\u3057\u3044\u30b9\u30bf\u30a4\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb\u3067\u3059\u304c\u3001\u8907\u96d1\u306a\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092<code>class<\/code>\u5c5e\u6027\u306e\u4e2d\u306b\u8a18\u8ff0\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u53ef\u8aad\u6027\u304c\u5d29\u58ca\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>HTML<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"transition-all duration-500 ease-in-out hover:scale-110 hover:rotate-3 opacity-0 animate-fade-in ...\"&gt;\n  &lt;\/div&gt;\n<\/code><\/pre>\n\n\n\n<p>Framer Motion\u3092\u4f7f\u3048\u3070\u3001<strong>\u300c\u898b\u305f\u76ee\u306e\u30b9\u30bf\u30a4\u30eb\uff08Tailwind\uff09\u300d\u3068\u300c\u52d5\u304d\u306e\u30ed\u30b8\u30c3\u30af\uff08Framer\uff09\u300d\u3092\u5b8c\u5168\u306b\u5206\u96e2<\/strong>\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3092\u3059\u308b\u969b\u306b\u3082\u975e\u5e38\u306b\u6709\u52b9\u3067\u3059\u3002\u300c\u30c7\u30b6\u30a4\u30f3\u306e\u5909\u66f4\u300d\u306a\u306e\u304b\u300c\u52d5\u304d\u306e\u5909\u66f4\u300d\u306a\u306e\u304b\u304c\u3001\u4e00\u76ee\u3067\u308f\u304b\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u5ba3\u8a00\u7684UI\u3068\u306e\u76f8\u6027\u306e\u826f\u3055<\/h3>\n\n\n\n<p>React\/Next.js\u306e\u3088\u3046\u306a\u300c\u72b6\u614b\uff08State\uff09\u300d\u99c6\u52d5\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u304a\u3044\u3066\u3001jQuery\u6642\u4ee3\u306e\u3088\u3046\u306a\u300c\u547d\u4ee4\u7684\u300d\u306a\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\uff08<code>elem.style.height = ...<\/code>\u3068\u66f8\u304f\u3088\u3046\u306a\u3084\u308a\u65b9\uff09\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Framer Motion\u306fReact\u306e\u305f\u3081\u306b\u4f5c\u3089\u308c\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308a\u3001**\u300c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3042\u308b\u72b6\u614b\u306b\u306a\u3063\u305f\u3089\u3001\u3069\u3046\u3042\u308b\u3079\u304d\u304b\u300d**\u3092\u5ba3\u8a00\u3059\u308b\u3060\u3051\u3067\u3001\u305d\u306e\u9593\u306e\u88dc\u9593\u3092\u81ea\u52d5\u3067\u884c\u3063\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u304c\u3001\u958b\u767a\u4f53\u9a13\uff08DX\uff09\u3092\u5287\u7684\u306b\u5411\u4e0a\u3055\u305b\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u8df5\uff1a\u30b9\u30af\u30ed\u30fc\u30eb\u9023\u52d5\u3067\u300c\u3075\u308f\u3063\u300d\u3068\u51fa\u3059\u57fa\u672c\u306e\u30ad<\/h2>\n\n\n\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002 LP\uff08\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\uff09\u3067\u6700\u3082\u3088\u304f\u4f7f\u308f\u308c\u308b**\u300c\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u305f\u3089\u8981\u7d20\u304c\u4e0b\u304b\u3089\u6d6e\u304d\u4e0a\u304c\u308b\u300d**\u5b9f\u88c5\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u57fa\u672c\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u69cb\u6210<\/h3>\n\n\n\n<p>\u307e\u305a\u3001<code>motion.div<\/code> \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u901a\u5e38\u306e <code>div<\/code> \u30bf\u30b0\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u6a5f\u80fd\u304c\u751f\u3048\u305f\u3082\u306e\u3068\u8003\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>TypeScript<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ components\/ScrollRevealCard.tsx\n'use client'; \/\/ App Router\u3067\u306f\u5fc5\u9808\n\nimport { motion } from 'framer-motion';\n\ntype Props = {\n  children: React.ReactNode;\n  className?: string;\n};\n\nexport const ScrollRevealCard = ({ children, className }: Props) =&gt; {\n  return (\n    &lt;motion.div\n      \/\/ 1. \u521d\u671f\u72b6\u614b\uff08\u96a0\u308c\u3066\u3044\u308b\u72b6\u614b\uff09\n      initial={{ opacity: 0, y: 50 }}\n      \n      \/\/ 2. \u753b\u9762\u5185\u306b\u5165\u3063\u305f\u6642\u306e\u72b6\u614b\uff08\u8868\u793a\u3055\u308c\u308b\u72b6\u614b\uff09\n      whileInView={{ opacity: 1, y: 0 }}\n      \n      \/\/ 3. \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u8a2d\u5b9a\n      transition={{\n        duration: 0.6,        \/\/ 0.6\u79d2\u304b\u3051\u3066\n        ease: \"easeOut\",      \/\/ \u6e1b\u901f\u3057\u306a\u304c\u3089\n        delay: 0.2            \/\/ 0.2\u79d2\u5f85\u3063\u3066\u304b\u3089\u958b\u59cb\n      }}\n      \n      \/\/ 4. \u30d3\u30e5\u30fc\u30dd\u30fc\u30c8\u306e\u8a2d\u5b9a\n      viewport={{ \n        once: true,           \/\/ \u4e00\u5ea6\u8868\u793a\u3055\u308c\u305f\u3089\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u306a\u3044\n        amount: 0.5           \/\/ \u8981\u7d20\u306e50%\u304c\u898b\u3048\u305f\u3089\u767a\u706b\n      }}\n      \n      \/\/ Tailwind\u306e\u30af\u30e9\u30b9\u3082\u305d\u306e\u307e\u307e\u6e21\u305b\u307e\u3059\n      className={className}\n    &gt;\n      {children}\n    &lt;\/motion.div&gt;\n  );\n};\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u3053\u3060\u308f\u308a\u306e\u30dd\u30a4\u30f3\u30c8\uff1a<code>viewport<\/code> \u8a2d\u5b9a<\/h3>\n\n\n\n<p>\u3053\u3053\u3067\u7279\u306b\u91cd\u8981\u306a\u306e\u304c <code>viewport={{ once: true }}<\/code> \u3067\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u30b9\u30af\u30ed\u30fc\u30eb\u30a2\u30a6\u30c8\u3057\u3066\u518d\u5ea6\u30b9\u30af\u30ed\u30fc\u30eb\u30a4\u30f3\u3059\u308b\u3068\u3001\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u518d\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002LP\u306e\u3088\u3046\u306a\u30b9\u30c8\u30fc\u30ea\u30fc\u6027\u306e\u3042\u308b\u30da\u30fc\u30b8\u3067\u306f\u3001\u4f55\u5ea6\u3082\u8981\u7d20\u304c\u51fa\u305f\u308a\u6d88\u3048\u305f\u308a\u3059\u308b\u3068**\u300c\u52d5\u304d\u304c\u3046\u308b\u3055\u3044\u300d**\u3068\u611f\u3058\u3089\u308c\u3001\u96e2\u8131\u7387\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u300c\u4e00\u5ea6\u3060\u3051\u4e0a\u54c1\u306b\u898b\u305b\u308b\u300d\u3002\u3053\u308c\u304cStudio Puff\u6d41\u306e\u3053\u3060\u308f\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u73fe\u5834\u306e\u30ea\u30a2\u30eb\uff1a\u8907\u96d1\u306a\u300cStagger\uff08\u6642\u9593\u5dee\uff09\u300d\u6f14\u51fa\u306e\u5b9f\u88c5<\/h2>\n\n\n\n<p>\u6b21\u306b\u3001\u30c7\u30b6\u30a4\u30ca\u30fc\u304c\u5927\u597d\u304d\u306a**\u300c\u30ea\u30b9\u30c8\u9805\u76ee\u304c\u30dd\u30f3\u3001\u30dd\u30f3\u3001\u30dd\u30f3\u3068\u9806\u756a\u306b\u51fa\u3066\u304f\u308b\u300d**\u6f14\u51fa\uff08Stagger Animation\uff09\u306e\u5b9f\u88c5\u3067\u3059\u3002 \u3053\u308c\u3092CSS\u3060\u3051\u3067\u3084\u308d\u3046\u3068\u3059\u308b\u3068\u3001<code>nth-child<\/code> \u3054\u3068\u306b <code>animation-delay<\/code> \u3092\u8a08\u7b97\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u9805\u76ee\u6570\u304c\u5897\u6e1b\u3059\u308b\u305f\u3073\u306b\u4fee\u6b63\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Framer Motion\u306a\u3089\u3001\u89aa\u8981\u7d20\u306b\u8a2d\u5b9a\u3092\u66f8\u304f\u3060\u3051\u3067\u81ea\u52d5\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u3010\u3053\u3053\u306b\u30ea\u30b9\u30c8\u30a2\u30a4\u30c6\u30e0\u304c\u5de6\u304b\u3089\u53f3\u3078\u9806\u756a\u306b\u6d41\u308c\u308b\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308bGIF\u753b\u50cf\u3092\u8cbc\u308b\u3011<\/strong><\/p>\n\n\n\n<p>TypeScript<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ components\/StaggerList.tsx\n'use client';\n\nimport { motion } from 'framer-motion';\n\n\/\/ \u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u5b9a\u7fa9\uff08Variants\uff09\u3092\u5916\u306b\u51fa\u3057\u3066\u53ef\u8aad\u6027\u30a2\u30c3\u30d7\nconst containerVariants = {\n  hidden: { opacity: 0 },\n  visible: {\n    opacity: 1,\n    transition: {\n      staggerChildren: 0.2, \/\/ \u5b50\u8981\u7d20\u30920.2\u79d2\u305a\u3089\u3057\u3066\u5b9f\u884c\uff01\n      delayChildren: 0.3,   \/\/ \u6700\u521d\u306e\u958b\u59cb\u30920.3\u79d2\u9045\u3089\u305b\u308b\n    },\n  },\n};\n\nconst itemVariants = {\n  hidden: { opacity: 0, x: -20 },\n  visible: { \n    opacity: 1, \n    x: 0,\n    transition: {\n       type: \"spring\",      \/\/ \u30d0\u30cd\u306e\u3088\u3046\u306a\u7269\u7406\u6319\u52d5\n       stiffness: 120 \n    }\n  },\n};\n\nexport const StaggerList = ({ items }: { items: string&#91;] }) =&gt; {\n  return (\n    &lt;motion.ul\n      className=\"space-y-4\"\n      variants={containerVariants} \/\/ \u89aa\u306e\u8a2d\u5b9a\n      initial=\"hidden\"\n      whileInView=\"visible\"\n      viewport={{ once: true }}\n    &gt;\n      {items.map((item, index) =&gt; (\n        &lt;motion.li\n          key={index}\n          variants={itemVariants} \/\/ \u5b50\u306f\u89aa\u306e\u72b6\u614b\uff08hidden\/visible\uff09\u3092\u53d7\u3051\u7d99\u3050\n          className=\"p-4 bg-white shadow-md rounded-lg\"\n        &gt;\n          {item}\n        &lt;\/motion.li&gt;\n      ))}\n    &lt;\/motion.ul&gt;\n  );\n};\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u3053\u3060\u308f\u308a\u306e\u30dd\u30a4\u30f3\u30c8\uff1a<code>type: \"spring\"<\/code><\/h3>\n\n\n\n<p>\u3053\u3053\u3067 <code>ease<\/code> \u3067\u306f\u306a\u304f <code>type: \"spring\"<\/code> \u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u70b9\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u7dda\u5f62\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\uff08Linear\uff09\u3084\u5358\u306a\u308b\u30a4\u30fc\u30b8\u30f3\u30b0\uff08Ease\uff09\u306f\u300c\u30c7\u30b8\u30bf\u30eb\u306e\u52d5\u304d\u300d\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u304c\u3001Spring\uff08\u30d0\u30cd\uff09\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001**\u7269\u7406\u6cd5\u5247\u306b\u57fa\u3065\u3044\u305f\u300c\u91cd\u307f\u300d\u3084\u300c\u53cd\u52d5\u300d<strong>\u3092\u8868\u73fe\u3067\u304d\u307e\u3059\u3002 \u300c\u30b7\u30e5\u30c3\u300d\u3068\u6b62\u307e\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u6975\u5c0f\u306e\u30aa\u30fc\u30d0\u30fc\u30b7\u30e5\u30fc\u30c8\uff08\u884c\u304d\u904e\u304e\u3066\u623b\u308b\u52d5\u304d\uff09\u304c\u542b\u307e\u308c\u308b\u3053\u3068\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\uff08UX\uff09\u306b<\/strong>\u300c\u89e6\u3063\u3066\u3044\u308b\u611f\u300d**\u3092\u751f\u307f\u51fa\u305b\u308b\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u3010\u91cd\u8981\u3011\u79c1\u305f\u3061\u304c\u8e0f\u307f\u629c\u3044\u305f\u300c\u30cf\u30de\u308a\u30dd\u30a4\u30f3\u30c8\u300d\u3068\u89e3\u6c7a\u7b56<\/h2>\n\n\n\n<p>\u3055\u3066\u3001\u3053\u3053\u304b\u3089\u304c\u672c\u984c\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u901a\u308a\u306b\u5b9f\u88c5\u3057\u3066\u3082\u3001\u5b9f\u969b\u306e\u958b\u767a\u73fe\u5834\uff08\u7279\u306bNext.js\u74b0\u5883\uff09\u3067\u306f\u4e88\u671f\u305b\u306c\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3057\u307e\u3059\u3002\u79c1\u305f\u3061\u304c\u5b9f\u969b\u306b\u76f4\u9762\u3057\u3001\u89e3\u6c7a\u306b\u6642\u9593\u3092\u8cbb\u3084\u3057\u305f2\u3064\u306e\u4e8b\u4f8b\u3092\u5171\u6709\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u60aa\u5922\u306e\u300cHydration failed\u300d\u30a8\u30e9\u30fc<\/h3>\n\n\n\n<p>App Router\u74b0\u5883\u4e0b\u3067\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u305f\u3042\u308b\u65e5\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u4e0d\u5409\u306a\u8d64\u3044\u6587\u5b57\u304c\u5927\u91cf\u306b\u51fa\u529b\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u73fe\u8c61:<\/strong> \u753b\u9762\u304c\u4e00\u77ac\u30c1\u30e9\u3064\u3044\u305f\u5f8c\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5d29\u308c\u305f\u308a\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u304c\u52b9\u304b\u306a\u304f\u306a\u3063\u305f\u308a\u3059\u308b\u3002<\/li>\n\n\n\n<li><strong>\u539f\u56e0:<\/strong> Framer Motion\u304c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30a4\u30c9\uff08\u30d6\u30e9\u30a6\u30b6\uff09\u3067\u521d\u671f\u5316\u3055\u308c\u308b\u969b\u306e\u72b6\u614b\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\uff08SSR\uff09\u3067\u751f\u6210\u3055\u308c\u305fHTML\u306e\u72b6\u614b\u304c\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u3002\u7279\u306b\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u5024\u3092\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306b\u4f7f\u3063\u305f\u308a\u3001\u30d6\u30e9\u30a6\u30b6\u5e45\uff08<code>window.innerWidth<\/code>\uff09\u3092\u521d\u671f\u5024\u306b\u4f7f\u3063\u305f\u308a\u3057\u305f\u5834\u5408\u306b\u767a\u751f\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u89e3\u6c7a\u7b56\uff1a<code>useEffect<\/code> \u3067\u306e\u30de\u30a6\u30f3\u30c8\u5224\u5b9a<\/h4>\n\n\n\n<p>\u3053\u306e\u554f\u984c\u306e\u78ba\u5b9f\u306a\u56de\u907f\u7b56\u306f\u3001\u300c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\uff08\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30a4\u30c9\u3067\u3042\u308b\u3053\u3068\u304c\u78ba\u5b9a\u3057\u305f\uff09\u5f8c\u300d\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u6709\u52b9\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p>TypeScript<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ hooks\/useIsMounted.ts\nimport { useEffect, useState } from 'react';\n\nexport const useIsMounted = () =&gt; {\n  const &#91;mounted, setMounted] = useState(false);\n  useEffect(() =&gt; {\n    setMounted(true);\n  }, &#91;]);\n  return mounted;\n};\n<\/code><\/pre>\n\n\n\n<p>TypeScript<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5074\u3067\u306e\u4f7f\u7528\u4f8b\nconst isMounted = useIsMounted();\n\nif (!isMounted) {\n  \/\/ SSR\u6642\u306f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306a\u3057\u306e\u9759\u7684\u306a\u72b6\u614b\u3001\u307e\u305f\u306f\u30b9\u30b1\u30eb\u30c8\u30f3\u3092\u8fd4\u3059\n  return &lt;div className=\"opacity-0\"&gt;Loading...&lt;\/div&gt;;\n}\n\nreturn (\n  &lt;motion.div initial={{ opacity: 0 }} ... &gt;\n    {\/* \u30b3\u30f3\u30c6\u30f3\u30c4 *\/}\n  &lt;\/motion.div&gt;\n);\n<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u300c\u30de\u30a6\u30f3\u30c8\u5224\u5b9a\u300d\u3092\u5165\u308c\u308b\u4e00\u624b\u9593\u3067\u3001\u4e0d\u53ef\u89e3\u306aSSR\u30a8\u30e9\u30fc\u306e9\u5272\u306f\u89e3\u6d88\u3055\u308c\u307e\u3057\u305f\u3002\u5730\u5473\u3067\u3059\u304c\u3001\u5b89\u5b9a\u3057\u305f\u30b5\u30a4\u30c8\u904b\u7528\u306b\u306f\u6b20\u304b\u305b\u306a\u3044\u51e6\u7406\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <code>layout<\/code> \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3088\u308b\u753b\u50cf\u306e\u6b6a\u307f<\/h3>\n\n\n\n<p>Framer Motion\u306b\u306f <code>layout<\/code> \u3068\u3044\u3046\u9b54\u6cd5\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u4ed8\u3051\u308b\u3060\u3051\u3067\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u5909\u66f4\uff08\u30ea\u30b9\u30c8\u306e\u4e26\u3073\u66ff\u3048\u306a\u3069\uff09\u6642\u306b\u30b9\u30e0\u30fc\u30ba\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u304f\u308c\u308b\u7d20\u6674\u3089\u3057\u3044\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001<code>img<\/code> \u30bf\u30b0\u3084 <code>border-radius<\/code> \u3092\u6301\u3064\u8981\u7d20\u306b <code>layout<\/code> \u3092\u5b89\u6613\u306b\u4ed8\u4e0e\u3059\u308b\u3068\u3001\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u4e2d\u306b\u753b\u50cf\u304c**\u300c\u30b0\u30cb\u30e3\u30c3\u300d\u3068\u6b6a\u3093\u3067\u5f15\u304d\u4f38\u3070\u3055\u308c\u308b\u73fe\u8c61**\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30dd\u30b8\u30bf\u30ec\u30a4\u30e4\u30fc\u306e\u51e6\u7406\u4e0a\u3001\u5909\u5f62\uff08Transform\uff09\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u308b\u305f\u3081\u306b\u8d77\u3053\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u89e3\u6c7a\u7b56:<\/strong> \u5b50\u8981\u7d20\uff08\u753b\u50cf\u306a\u3069\uff09\u306b\u3082 <code>layout<\/code> \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4ed8\u4e0e\u3059\u308b\u304b\u3001<code>borderRadius<\/code> \u3092\u30b9\u30bf\u30a4\u30eb\u3067\u306f\u306a\u304f <code>motion<\/code> \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u3057\u3066\u7ba1\u7406\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<p>TypeScript<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u6b6a\u307f\u3092\u9632\u3050\u66f8\u304d\u65b9\n&lt;motion.div layout style={{ borderRadius: 20 }}&gt;\n  &lt;motion.img layout src=\"...\" \/&gt; \n&lt;\/motion.div&gt;\n<\/code><\/pre>\n\n\n\n<p>\u300c\u4fbf\u5229\u3060\u304b\u3089\u3068\u308a\u3042\u3048\u305a\u4ed8\u3051\u3066\u304a\u3053\u3046\u300d\u306f\u7981\u7269\u3067\u3059\u3002\u5fc5\u305a\u5b9f\u6a5f\u3067\u6319\u52d5\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\uff1a\u6280\u8853\u3067\u30c7\u30b6\u30a4\u30f3\u3092\u52a0\u901f\u3055\u305b\u308b<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u3001Next.js \u00d7 Tailwind CSS \u00d7 Framer Motion \u3092\u7528\u3044\u305f\u3001\u30e2\u30c0\u30f3\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u5b9f\u88c5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Tailwind CSS<\/strong> \u3067\u30b9\u30bf\u30a4\u30eb\u3092\u7ba1\u7406\u3057\u3001<\/li>\n\n\n\n<li><strong>Framer Motion<\/strong> \u3067\u52d5\u304d\u306e\u30ed\u30b8\u30c3\u30af\u3092\u5206\u96e2\u30fb\u5ba3\u8a00\u3057\u3001<\/li>\n\n\n\n<li><strong>Next.js (SSR)<\/strong> \u7279\u6709\u306e\u30cf\u30a4\u30c9\u30ec\u30fc\u30b7\u30e7\u30f3\u30a8\u30e9\u30fc\u3092\u9069\u5207\u306b\u56de\u907f\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u306e\u30d5\u30ed\u30fc\u3092\u78ba\u7acb\u3057\u3066\u4ee5\u6765\u3001Studio Puff\u3067\u306f\u30c7\u30b6\u30a4\u30ca\u30fc\u304b\u3089\u306e\u300c\u3053\u3053\u3001\u3044\u3044\u611f\u3058\u306b\u52d5\u304b\u305b\u307e\u3059\uff1f\u300d\u3068\u3044\u3046\u30aa\u30fc\u30c0\u30fc\u306b\u5bfe\u3057\u3066\u3001**\u300c\u3082\u3061\u308d\u3093\u3067\u3059\uff08\u3057\u304b\u3082\u5de5\u6570\u306f\u305d\u3093\u306a\u306b\u304b\u304b\u308a\u307e\u305b\u3093\u3088\uff09\u300d**\u3068\u81ea\u4fe1\u3092\u6301\u3063\u3066\u7b54\u3048\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u300c\u52d5\u304d\u300d\u306e\u5f15\u304d\u51fa\u3057\u3092\u591a\u304f\u6301\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u3001\u30c7\u30b6\u30a4\u30ca\u30fc\u306e\u5275\u9020\u6027\u3092\u523a\u6fc0\u3057\u3001\u7d50\u679c\u3068\u3057\u3066Web\u30b5\u30a4\u30c8\u306e\u30af\u30aa\u30ea\u30c6\u30a3\u3092\u5e95\u4e0a\u3052\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305c\u3072\u3001\u7686\u3055\u3093\u306e\u6b21\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3082\u3001\u307e\u305a\u306f\u30d5\u30a1\u30fc\u30b9\u30c8\u30d3\u30e5\u30fc\uff08FV\uff09\u306e\u30ad\u30e3\u30c3\u30c1\u30b3\u30d4\u30fc1\u884c\u304b\u3089\u3001Framer Motion\u3092\u5c0e\u5165\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u30b5\u30a4\u30c8\u304c\u300c\u751f\u304d\u3066\u3044\u308b\u300d\u3088\u3046\u306b\u611f\u3058\u3089\u308c\u308b\u77ac\u9593\u304c\u3001\u304d\u3063\u3068\u3042\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u308f\u304b\u308a\u307e\u3059\u3002\u300c\u30d5\u30ef\u30c3\u300d\u3084\u300c\u30b7\u30e5\u30c3\u300d\u306e\u30cb\u30e5\u30a2\u30f3\u30b9\u3092\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u3080\u306e\u304c\u6211\u3005\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u4ed5\u4e8b\u3067\u3059\u304c\u3001\u3053\u308c\u3092\u7d20\u306eCSS\uff08transition\u3084@keyframes\uff09\u3060\u3051\u3067\u518d\u73fe\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001cubic-bezier\u306e\u6570\u5024\u8abf\u6574 &hellip; <a href=\"https:\/\/studio-puff.com\/tech\/better-rich\/\">Continued<\/a><\/p>\n","protected":false},"author":1,"featured_media":107,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,29,17,28],"tags":[16],"class_list":["post-106","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","category-29","category-17","category-28","tag-ai"],"_links":{"self":[{"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":2,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/posts\/106\/revisions\/112"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/media\/107"}],"wp:attachment":[{"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studio-puff.com\/tech\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}