{"id":456044,"date":"2025-04-14T15:01:55","date_gmt":"2025-04-14T15:01:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=456044"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=456044","title":{"rendered":"<span>\u041f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043a \u0444\u0438\u0447\u0430: \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u043f\u043e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 UI \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ca\/515\/c48\/5ca515c487fa2a6b982e9528f6949109.png\" width=\"1536\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/5ca\/515\/c48\/5ca515c487fa2a6b982e9528f6949109.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5ca\/515\/c48\/5ca515c487fa2a6b982e9528f6949109.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>UI-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u0443, \u043d\u043e \u0438 \u043f\u0440\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445: CSS, Framer Motion, GSAP \u0438 Motion One. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043c\u043d\u0435\u043d\u0438\u0435\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. \u0412 \u043a\u043e\u043d\u0446\u0435 \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0438 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.  <\/p>\n<h3>\u041a\u043e\u0433\u0434\u0430 &#171;\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f&#187; \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>\u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 \u043f\u0440\u0438\u043d\u0435\u0441 \u043c\u0430\u043a\u0435\u0442 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c: \u00ab\u0412\u043e\u0442 \u0442\u0443\u0442 \u043a\u043d\u043e\u043f\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 <em>\u043c\u044f\u0433\u043a\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u043a\u043e<\/em>, \u0430 \u043f\u043e\u0442\u043e\u043c <em>\u0443\u043b\u0435\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u044b\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0437\u044b\u0440\u044c<\/em>\u00bb. \u042f \u043a\u0438\u0432\u043d\u0443\u043b, \u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u00ab\u042d\u0442\u043e \u0442\u0435\u0431\u0435 \u043d\u0435 After Effects\u00bb. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u2014 \u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043c\u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c: \u0447\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u044f \u0432\u0437\u044f\u043b 4 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0432 \u0431\u043e\u0435\u0432\u044b\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445:<\/p>\n<ul>\n<li>\n<p><strong>CSS-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>GSAP<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Framer Motion (\u0434\u043b\u044f React)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Motion One (\u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 Framer Motion, \u043d\u043e \u0432 Vanilla JS)<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0441\u0440\u0430\u0432\u043d\u0438\u043b \u0438\u0445 \u043d\u0430 \u0442\u0440\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445, \u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445:<\/p>\n<ol>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 (shared element transition)<\/p>\n<\/li>\n<\/ol>\n<h3>\u041a\u0435\u0439\u0441\u044b \u0438 \u043a\u043e\u0434<\/h3>\n<h4>\u041a\u0435\u0439c 1. \u041f\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438<\/h4>\n<p><strong> CSS (\u0447\u0438\u0441\u0442\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434)  <\/strong><\/p>\n<pre><code class=\"css\">.card {   opacity: 0;   transform: translateY(20px);   transition: opacity 0.4s ease, transform 0.4s ease; }  .card.visible {   opacity: 1;   transform: translateY(0); }<\/code><\/pre>\n<pre><code class=\"xml\">&lt;div class=\"card\"&gt;\u041a\u043e\u043d\u0442\u0435\u043d\u0442&lt;\/div&gt;  &lt;script&gt;   document.querySelector('.card').classList.add('visible'); &lt;\/script&gt;<\/code><\/pre>\n<p><strong> GSAP  <\/strong><\/p>\n<pre><code class=\"javascript\">import gsap from \"gsap\";  gsap.fromTo(\".card\",    { opacity: 0, y: 20 },    { opacity: 1, y: 0, duration: 0.4, ease: \"power2.out\" } );<\/code><\/pre>\n<h3>Framer Motion (React)<\/h3>\n<pre><code>&lt;motion.div   initial={{ opacity: 0, y: 20 }}   animate={{ opacity: 1, y: 0 }}   transition={{ duration: 0.4, ease: \"easeOut\" }} &gt;   \u041a\u043e\u043d\u0442\u0435\u043d\u0442 &lt;\/motion.div&gt;<\/code><\/pre>\n<h3>Motion One<\/h3>\n<pre><code class=\"javascript\">import { animate } from \"motion\";  animate(\".card\", { opacity: [0, 1], transform: [\"translateY(20px)\", \"translateY(0)\"] }, {   duration: 0.4,   easing: \"ease-out\" });<\/code><\/pre>\n<p><strong>\u0412\u044b\u0432\u043e\u0434:<\/strong><br \/>CSS \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e. GSAP \u2014 \u0441\u0443\u043f\u0435\u0440\u0433\u0438\u0431\u043a\u0438\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. Framer Motion \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 React, \u043f\u043e\u0447\u0442\u0438 \u043c\u0430\u0433\u0438\u044f. Motion One \u2014 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439, \u043d\u043e \u0435\u0449\u0451 \u043d\u0435 \u0442\u0430\u043a \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d.<\/p>\n<h3>\u041a\u0435\u0439c 2. Hover-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438: \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0442\u043e\u0440\u043c\u043e\u0437\u043e\u0432<\/h3>\n<h3>CSS (\u0441\u0442\u0430\u0440\u044b\u0439-\u0434\u043e\u0431\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431)<\/h3>\n<pre><code class=\"css\">.button {   transition: transform 0.3s ease; } .button:hover {   transform: scale(1.05); }<\/code><\/pre>\n<h3>Framer Motion<\/h3>\n<pre><code>&lt;motion.button   whileHover={{ scale: 1.05 }}   transition={{ type: \"spring\", stiffness: 300 }} &gt;   \u041d\u0430\u0436\u043c\u0438 \u043c\u0435\u043d\u044f &lt;\/motion.button&gt;<\/code><\/pre>\n<h3>GSAP \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438<\/h3>\n<pre><code class=\"javascript\">const btn = document.querySelector('.button');  btn.addEventListener(\"mouseenter\", () =&gt; {   gsap.to(btn, { scale: 1.05, duration: 0.3 }); });  btn.addEventListener(\"mouseleave\", () =&gt; {   gsap.to(btn, { scale: 1, duration: 0.3 }); });<\/code><\/pre>\n<p><strong>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<\/strong><br \/>CSS \u2014 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e GPU \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451 \u0441\u0430\u043c. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u0443\u043f\u0440\u0443\u0433\u0430\u044f, \u0440\u0435\u0437\u0438\u043d\u043e\u0432\u0430\u044f, \u00ab\u0436\u0438\u0432\u0443\u0449\u0430\u044f\u00bb \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u2014 \u0442\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f GSAP \u0438\u043b\u0438 Framer Motion. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e Framer: hover-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441 &#171;spring&#187; \u2014 \u043a\u0430\u0439\u0444.<\/p>\n<h3>\u041a\u0435\u0439c 3. Shared element transition: \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438<\/h3>\n<p>\u042d\u0442\u043e \u043f\u0440\u044f\u043c \u0431\u043e\u043b\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &#171;\u043f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u043b&#187; \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. \u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0432 e-commerce: \u043a\u043b\u0438\u043a\u0430\u0435\u0448\u044c \u043d\u0430 \u0442\u043e\u0432\u0430\u0440, \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 &#171;\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u0435\u0442&#187; \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u2014 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e, \u0430 <strong>\u043f\u043b\u0430\u0432\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong>.<\/p>\n<h3>Framer Motion (Layout animations \u0432 React)<\/h3>\n<p>\u041d\u0430 <strong>\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/strong> \u0441 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432:<\/p>\n<pre><code>&lt;Link to={`\/product\/${id}`}&gt;   &lt;motion.div layoutId={`product-image-${id}`} className=\"product-card\"&gt;     &lt;img src=\"item.jpg\" alt=\"item\" \/&gt;     &lt;p&gt;\u0421\u0443\u043f\u0435\u0440\u0442\u043e\u0432\u0430\u0440&lt;\/p&gt;   &lt;\/motion.div&gt; &lt;\/Link&gt;<\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435:<\/p>\n<pre><code>&lt;motion.div layoutId={`product-image-${id}`} className=\"product-detail\"&gt;   &lt;img src=\"item.jpg\" alt=\"item\" \/&gt;   &lt;h2&gt;\u0421\u0443\u043f\u0435\u0440\u0442\u043e\u0432\u0430\u0440&lt;\/h2&gt;   &lt;p&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435&lt;\/p&gt; &lt;\/motion.div&gt;<\/code><\/pre>\n<p><strong>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442:<\/strong> <code>layoutId<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u0422\u043e\u0433\u0434\u0430 Framer Motion \u0441\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.<\/p>\n<h3>GSAP Flip Plugin (\u0434\u043b\u044f Vanilla JS \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438)<\/h3>\n<pre><code class=\"xml\">&lt;div class=\"product-card\" data-id=\"123\"&gt;   &lt;img src=\"item.jpg\" \/&gt; &lt;\/div&gt;<\/code><\/pre>\n<pre><code class=\"javascript\">import { Flip } from \"gsap\/Flip\";  const card = document.querySelector(\".product-card\"); const detail = document.querySelector(\".product-detail\");  const state = Flip.getState(card);  detail.appendChild(card); \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c DOM-\u044d\u043b\u0435\u043c\u0435\u043d\u0442  Flip.from(state, {   duration: 1,   ease: \"power1.inOut\" });<\/code><\/pre>\n<p><strong>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<\/strong><br \/> \u0424\u0440\u0435\u0439\u043c\u0435\u0440 \u2014 \u043c\u0430\u0433\u0438\u044f \u0431\u0435\u0437 \u0431\u043e\u043b\u0438. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 React \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0447\u0443\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f <code>AnimatePresence<\/code>. GSAP \u0441 Flip \u2014 \u043f\u0443\u0448\u043a\u0430, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043e\u043f\u043b\u0430\u0442\u044b. CSS \u0437\u0434\u0435\u0441\u044c, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p><strong>GSAP<\/strong> \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Framer Motion<\/strong> \u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 React.<\/p>\n<\/li>\n<li>\n<p><strong>Motion One<\/strong> \u2014 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>CSS<\/strong> \u2014 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439, \u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0410 \u0447\u0442\u043e \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/h3>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 Chrome DevTools \u0438 \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e&#8230;<\/p>\n<ul>\n<li>\n<p>CSS \u0438 Motion One \u2014 \u043b\u0438\u0434\u0435\u0440\u044b \u043f\u043e FPS \u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>Framer Motion \u2014 \u0447\u0443\u0442\u044c \u0442\u044f\u0436\u0435\u043b\u0435\u0435, \u043d\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e.<\/p>\n<\/li>\n<li>\n<p>GSAP \u2014 \u0441\u0430\u043c\u044b\u0439 \u0442\u044f\u0436\u0435\u043b\u044b\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u0438 \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u043e\u0433\u043e<\/h3>\n<p>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u0442. \u0412\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e? <strong>CSS<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0432 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438? <strong>Framer Motion<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430? <strong>GSAP<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c? <strong>Motion One<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c. \u041f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u00ab\u0432\u0430\u0443\u00bb, \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f. \u0418 \u043e\u043d\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439.<\/p>\n<p>\u0425\u043e\u0447\u0435\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u044d\u0442\u0438\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 CodeSandbox \u0438\u043b\u0438 Stackblitz? \u041f\u0438\u0448\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2014 \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/900664\/\"> https:\/\/habr.com\/ru\/articles\/900664\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>UI-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u0443, \u043d\u043e \u0438 \u043f\u0440\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445: CSS, Framer Motion, GSAP \u0438 Motion One. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043c\u043d\u0435\u043d\u0438\u0435\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. \u0412 \u043a\u043e\u043d\u0446\u0435 \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u0438 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.  <\/p>\n<h3>\u041a\u043e\u0433\u0434\u0430 &#171;\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f&#187; \u0443\u0436\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>\u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440 \u043f\u0440\u0438\u043d\u0435\u0441 \u043c\u0430\u043a\u0435\u0442 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c: \u00ab\u0412\u043e\u0442 \u0442\u0443\u0442 \u043a\u043d\u043e\u043f\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 <em>\u043c\u044f\u0433\u043a\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u043a\u043e<\/em>, \u0430 \u043f\u043e\u0442\u043e\u043c <em>\u0443\u043b\u0435\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u044b\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0437\u044b\u0440\u044c<\/em>\u00bb. \u042f \u043a\u0438\u0432\u043d\u0443\u043b, \u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u043b: \u00ab\u042d\u0442\u043e \u0442\u0435\u0431\u0435 \u043d\u0435 After Effects\u00bb. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u0430\u043a\u0438\u0435 \u0432\u0435\u0449\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u2014 \u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043c\u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c: \u0447\u0435\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u044f \u0432\u0437\u044f\u043b 4 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0432 \u0431\u043e\u0435\u0432\u044b\u0445 \u0438 \u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445:<\/p>\n<ul>\n<li>\n<p><strong>CSS-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>GSAP<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Framer Motion (\u0434\u043b\u044f React)<\/strong><\/p>\n<\/li>\n<li>\n<p><strong>Motion One (\u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439 Framer Motion, \u043d\u043e \u0432 Vanilla JS)<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0441\u0440\u0430\u0432\u043d\u0438\u043b \u0438\u0445 \u043d\u0430 \u0442\u0440\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445, \u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445:<\/p>\n<ol>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 (shared element transition)<\/p>\n<\/li>\n<\/ol>\n<h3>\u041a\u0435\u0439\u0441\u044b \u0438 \u043a\u043e\u0434<\/h3>\n<h4>\u041a\u0435\u0439c 1. \u041f\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438<\/h4>\n<p><strong> CSS (\u0447\u0438\u0441\u0442\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434)  <\/strong><\/p>\n<pre><code class=\"css\">.card {   opacity: 0;   transform: translateY(20px);   transition: opacity 0.4s ease, transform 0.4s ease; }  .card.visible {   opacity: 1;   transform: translateY(0); }<\/code><\/pre>\n<pre><code class=\"xml\">&lt;div class=\"card\"&gt;\u041a\u043e\u043d\u0442\u0435\u043d\u0442&lt;\/div&gt;  &lt;script&gt;   document.querySelector('.card').classList.add('visible'); &lt;\/script&gt;<\/code><\/pre>\n<p><strong> GSAP  <\/strong><\/p>\n<pre><code class=\"javascript\">import gsap from \"gsap\";  gsap.fromTo(\".card\",    { opacity: 0, y: 20 },    { opacity: 1, y: 0, duration: 0.4, ease: \"power2.out\" } );<\/code><\/pre>\n<h3>Framer Motion (React)<\/h3>\n<pre><code>&lt;motion.div   initial={{ opacity: 0, y: 20 }}   animate={{ opacity: 1, y: 0 }}   transition={{ duration: 0.4, ease: \"easeOut\" }} &gt;   \u041a\u043e\u043d\u0442\u0435\u043d\u0442 &lt;\/motion.div&gt;<\/code><\/pre>\n<h3>Motion One<\/h3>\n<pre><code class=\"javascript\">import { animate } from \"motion\";  animate(\".card\", { opacity: [0, 1], transform: [\"translateY(20px)\", \"translateY(0)\"] }, {   duration: 0.4,   easing: \"ease-out\" });<\/code><\/pre>\n<p><strong>\u0412\u044b\u0432\u043e\u0434:<\/strong><br \/>CSS \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e. GSAP \u2014 \u0441\u0443\u043f\u0435\u0440\u0433\u0438\u0431\u043a\u0438\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. Framer Motion \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 React, \u043f\u043e\u0447\u0442\u0438 \u043c\u0430\u0433\u0438\u044f. Motion One \u2014 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439, \u043d\u043e \u0435\u0449\u0451 \u043d\u0435 \u0442\u0430\u043a \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d.<\/p>\n<h3>\u041a\u0435\u0439c 2. Hover-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438: \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0442\u043e\u0440\u043c\u043e\u0437\u043e\u0432<\/h3>\n<h3>CSS (\u0441\u0442\u0430\u0440\u044b\u0439-\u0434\u043e\u0431\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431)<\/h3>\n<pre><code class=\"css\">.button {   transition: transform 0.3s ease; } .button:hover {   transform: scale(1.05); }<\/code><\/pre>\n<h3>Framer Motion<\/h3>\n<pre><code>&lt;motion.button   whileHover={{ scale: 1.05 }}   transition={{ type: \"spring\", stiffness: 300 }} &gt;   \u041d\u0430\u0436\u043c\u0438 \u043c\u0435\u043d\u044f &lt;\/motion.button&gt;<\/code><\/pre>\n<h3>GSAP \u0441 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438<\/h3>\n<pre><code class=\"javascript\">const btn = document.querySelector('.button');  btn.addEventListener(\"mouseenter\", () =&gt; {   gsap.to(btn, { scale: 1.05, duration: 0.3 }); });  btn.addEventListener(\"mouseleave\", () =&gt; {   gsap.to(btn, { scale: 1, duration: 0.3 }); });<\/code><\/pre>\n<p><strong>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<\/strong><br \/>CSS \u2014 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e GPU \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451 \u0441\u0430\u043c. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u0430 \u0443\u043f\u0440\u0443\u0433\u0430\u044f, \u0440\u0435\u0437\u0438\u043d\u043e\u0432\u0430\u044f, \u00ab\u0436\u0438\u0432\u0443\u0449\u0430\u044f\u00bb \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u2014 \u0442\u0443\u0442 \u043b\u0443\u0447\u0448\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f GSAP \u0438\u043b\u0438 Framer Motion. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e Framer: hover-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441 &#171;spring&#187; \u2014 \u043a\u0430\u0439\u0444.<\/p>\n<h3>\u041a\u0435\u0439c 3. Shared element transition: \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438<\/h3>\n<p>\u042d\u0442\u043e \u043f\u0440\u044f\u043c \u0431\u043e\u043b\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &#171;\u043f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u043b&#187; \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. \u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0432 e-commerce: \u043a\u043b\u0438\u043a\u0430\u0435\u0448\u044c \u043d\u0430 \u0442\u043e\u0432\u0430\u0440, \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 &#171;\u043f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u0435\u0442&#187; \u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u2014 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e, \u0430 <strong>\u043f\u043b\u0430\u0432\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong>.<\/p>\n<h3>Framer Motion (Layout animations \u0432 React)<\/h3>\n<p>\u041d\u0430 <strong>\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/strong> \u0441 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432:<\/p>\n<pre><code>&lt;Link to={`\/product\/${id}`}&gt;   &lt;motion.div layoutId={`product-image-${id}`} className=\"product-card\"&gt;     &lt;img src=\"item.jpg\" alt=\"item\" \/&gt;     &lt;p&gt;\u0421\u0443\u043f\u0435\u0440\u0442\u043e\u0432\u0430\u0440&lt;\/p&gt;   &lt;\/motion.div&gt; &lt;\/Link&gt;<\/code><\/pre>\n<p>\u041d\u0430 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435:<\/p>\n<pre><code>&lt;motion.div layoutId={`product-image-${id}`} className=\"product-detail\"&gt;   &lt;img src=\"item.jpg\" alt=\"item\" \/&gt;   &lt;h2&gt;\u0421\u0443\u043f\u0435\u0440\u0442\u043e\u0432\u0430\u0440&lt;\/h2&gt;   &lt;p&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435&lt;\/p&gt; &lt;\/motion.div&gt;<\/code><\/pre>\n<p><strong>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442:<\/strong> <code>layoutId<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u0422\u043e\u0433\u0434\u0430 Framer Motion \u0441\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u043e\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.<\/p>\n<h3>GSAP Flip Plugin (\u0434\u043b\u044f Vanilla JS \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438)<\/h3>\n<pre><code class=\"xml\">&lt;div class=\"product-card\" data-id=\"123\"&gt;   &lt;img src=\"item.jpg\" \/&gt; &lt;\/div&gt;<\/code><\/pre>\n<pre><code class=\"javascript\">import { Flip } from \"gsap\/Flip\";  const card = document.querySelector(\".product-card\"); const detail = document.querySelector(\".product-detail\");  const state = Flip.getState(card);  detail.appendChild(card); \/\/ \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c DOM-\u044d\u043b\u0435\u043c\u0435\u043d\u0442  Flip.from(state, {   duration: 1,   ease: \"power1.inOut\" });<\/code><\/pre>\n<p><strong>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<\/strong><br \/> \u0424\u0440\u0435\u0439\u043c\u0435\u0440 \u2014 \u043c\u0430\u0433\u0438\u044f \u0431\u0435\u0437 \u0431\u043e\u043b\u0438. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 React \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0447\u0443\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f <code>AnimatePresence<\/code>. GSAP \u0441 Flip \u2014 \u043f\u0443\u0448\u043a\u0430, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043e\u043f\u043b\u0430\u0442\u044b. CSS \u0437\u0434\u0435\u0441\u044c, \u0447\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p><strong>GSAP<\/strong> \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Framer Motion<\/strong> \u043e\u0449\u0443\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u0432 React.<\/p>\n<\/li>\n<li>\n<p><strong>Motion One<\/strong> \u2014 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>CSS<\/strong> \u2014 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439, \u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0410 \u0447\u0442\u043e \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438?<\/h3>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0435\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 Chrome DevTools \u0438 \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e&#8230;<\/p>\n<ul>\n<li>\n<p>CSS \u0438 Motion One \u2014 \u043b\u0438\u0434\u0435\u0440\u044b \u043f\u043e FPS \u0438 \u043f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>Framer Motion \u2014 \u0447\u0443\u0442\u044c \u0442\u044f\u0436\u0435\u043b\u0435\u0435, \u043d\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e.<\/p>\n<\/li>\n<li>\n<p>GSAP \u2014 \u0441\u0430\u043c\u044b\u0439 \u0442\u044f\u0436\u0435\u043b\u044b\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u0438 \u0441\u0430\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u043e\u0433\u043e<\/h3>\n<p>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u0442. \u0412\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e? <strong>CSS<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0432 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438? <strong>Framer Motion<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430? <strong>GSAP<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c? <strong>Motion One<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c. \u041f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u00ab\u0432\u0430\u0443\u00bb, \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f. \u0418 \u043e\u043d\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439.<\/p>\n<p>\u0425\u043e\u0447\u0435\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u044d\u0442\u0438\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 CodeSandbox \u0438\u043b\u0438 Stackblitz? \u041f\u0438\u0448\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2014 \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/900664\/\"> https:\/\/habr.com\/ru\/articles\/900664\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-456044","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=456044"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456044\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=456044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=456044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=456044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}