{"id":322535,"date":"2021-05-04T09:00:32","date_gmt":"2021-05-04T09:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322535"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322535","title":{"rendered":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd5\/ca5\/e7a\/cd5ca5e7a7b66b37b352d614aef8153c.png\" alt=\"(\u0441) Freepik Storyset\" title=\"(\u0441) Freepik Storyset\" width=\"2000\" height=\"2000\"><figcaption>(\u0441) Freepik Storyset<\/figcaption><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u041a\u043e\u0433\u0442\u0435\u0432, \u044f \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 Web Core \u0432 \u0414\u043e\u043c\u041a\u043b\u0438\u043a. \u041c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/520630\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0438 \u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u043b\u0438, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e. \u0410 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 UI-kit. <\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u041d\u0443\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u0435\u0442 <em>\u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 (onboarding)&nbsp;\u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441&nbsp;\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c.<\/em><\/p>\n<h2>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<ol>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 (hint) \u0438\u043b\u0438 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u043a\u043d\u0430 (modal).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0432\u0438\u0434\u0438\u043c\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u043a\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 (\u043f\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0442\u0451\u043c\u043d\u044b\u0439 overlay.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441 \u0431\u0435\u043b\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 8 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u043c \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0439 \u0432 5 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<h2>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>Intro.js<\/p>\n<\/li>\n<li>\n<p>React-joyride<\/p>\n<\/li>\n<li>\n<p>Driver.js<\/p>\n<\/li>\n<li>\n<p>Shepherd<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438, \u043f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c \u0447\u0435\u0441\u0442\u043d\u043e, \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0443\u0434\u0438\u0432\u0438\u043b\u043e. \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043e\u043f\u0438\u0448\u0443 \u043a\u0430\u0436\u0434\u044b\u0439:<\/p>\n<ol>\n<li>\n<p><code>box-shadow: rgba(0, 0, 0, 0.5)&nbsp;0 0 0 5000px;<\/code> \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0435\u043d\u044c \u0432\u043e\u043a\u0440\u0443\u0433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>outline: 5000px&nbsp;solid&nbsp;rgba(0, 0, 0, .5);<\/code> \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0440\u0430\u043c\u043a\u0430, \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0449\u0430\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430<\/p>\n<\/li>\n<li>\n<p><code>mix-blend-mode: hard-light;<\/code> \u2014 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 overlay \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 overlay, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0435\u043b\u0430\u044f \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0430. \u0417\u0430\u0442\u0435\u043c \u0446\u0438\u043a\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u043e \u0432\u0441\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043c z-index, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u044b\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e SVG-\u043a\u0430\u0440\u0442\u0438\u043d\u043ae \u0441 \u0432\u044b\u0440\u0435\u0437\u043e\u043c \u043f\u043e\u0434 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0427\u0442\u043e\u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0412\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 SVG, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Canvas.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c<\/h2>\n<p>1) \u0421 hint \u0438 modal \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c UI kit&#8217;\u0435 \u0441\u043e \u0441\u0445\u043e\u0436\u0438\u043c API.<\/p>\n<p>2) \u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0438\u0437 kit&#8217;\u0430 \u2014 popper, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f callback \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 (\u0443\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438), \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<p>3) \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043d\u0430\u0434\u043e \u043b\u0438 \u0434\u043e \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c, \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 utils \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u043e\u043d\u0430 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0432\u0435\u0440\u0445 \u0438\u043b\u0438 \u0432\u043d\u0438\u0437 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u0442\u043e\u0447\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0435\u043d hint + offset) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0446\u0435\u043b\u0438, \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0438 \u043e\u0442\u0441\u0442\u0443\u043f \u043e\u0442 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430:<\/p>\n<pre><code class=\"javascript\">const { top, bottom } = nextElement.getBoundingClientRect();  if (!(top &gt;= offset &amp;&amp; bottom + offset &lt;= document.documentElement.clientHeight)) {   animatedScrollTo({     element: nextElement,     duration,     offset,   }); }<\/code><\/pre>\n<p>4) \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">import React, { useState, useEffect, useRef } from 'react'; import styles from '.\/Onboarding.scss';  const Overlay = ({ targetStyles }) =&gt; {   const [scrollY, setScrollY] = useState(0);   const canvasRef = useRef();    const handleRepaint = () =&gt; {     const canvas = canvasRef.current;      const windowWidth = window.innerWidth;     const windowHeight = window.innerHeight;      canvas.width = windowWidth;     canvas.height = windowHeight;   };    useEffect(handleRepaint, [scrollY, targetStyles]);    useEffect(() =&gt; {     const handleScroll = () =&gt; setScrollY(window.scrollY);      window.addEventListener('scroll', handleScroll);      return () =&gt; {       window.removeEventListener('scroll', handleScroll);     };   }, []);    return (     &lt;div className={styles.overlay}&gt;       &lt;canvas ref={canvasRef} \/&gt;     &lt;\/div&gt;   ); };  export { Overlay };<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0438\u0441\u0443\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/ru.reactjs.org\/docs\/portals.html\">createPortal<\/a>, \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c canvas. \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0446\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432 canvas \u0438 \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u043e \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 <code>fillRect<\/code> \u0441 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439 <code>fillStyle<\/code> \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e <code>globalAlpha<\/code>. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u043d\u0430 \u0431\u0435\u043b\u044b\u0439 \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">const handleRepaint = () =&gt; {   ...   const context = canvas.getContext('2d');    context.fillStyle = overlayColor;   context.globalAlpha = overlayOpacity;    context.fillRect(0, 0, windowWidth, windowHeight);    context.fillStyle = '#ffffff';   context.globalAlpha = 1; };<\/code><\/pre>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0431\u0435\u043b\u043e\u0439 \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u043e\u0439:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0432 targetStyles \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0435\u043b\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u0438 \/\/ \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f hint'\u0430 \u0431\u0435\u0437 \u0441\u0434\u0432\u0438\u0433\u043e\u0432 const { width, height, top, left } = targetStyles; const x = left - window.scrollX; const y = top - window.scrollY;  roundClearRect({ ctx: context, x, y, width, height, radius });<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0431\u0435\u043b\u043e\u0439 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u044b\u0448\u0435, \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u0446\u0435\u043b\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0431\u0435\u043b\u0443\u044e \u043e\u0431\u0432\u043e\u0434\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441\u043e \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \/\/ \u043f\u0443\u0442\u0451\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \/\/ \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0440\u0438\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c quadraticCurveTo const roundRect = ({ ctx, x, y, width, height, radius = 5, fill, stroke }) =&gt; {   const bottom = y + height;   const right = x + width;    ctx.beginPath();   ctx.moveTo(x + radius, y);   ctx.lineTo(right - radius, y);   ctx.quadraticCurveTo(right, y, right, y + radius);   ctx.lineTo(right, bottom - radius);   ctx.quadraticCurveTo(right, bottom, right - radius, bottom);   ctx.lineTo(x + radius, bottom);   ctx.quadraticCurveTo(x, bottom, x, bottom - radius);   ctx.lineTo(x, y + radius);   ctx.quadraticCurveTo(x, y, x + radius, y);   ctx.closePath();   if (fill) {     ctx.fill();   }   if (stroke) {     ctx.stroke();   } };  const roundClearRect = ({ ctx, x, y, width, height, radius }) =&gt; {   roundRect({     ctx,     x,     y,     width,     height,     radius: 5,     fill: true,   });   ... };<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e <code>globalCompositeOperation = 'destination-out'<\/code>. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c Canvas-\u0441\u043b\u043e\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041e\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0438\u0441\u0443\u0435\u0442 \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u0432 25 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u0443\u0433\u043b\u0443\u044e \u0438\u043a\u043e\u043d\u043a\u0443, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 25 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u043a\u0440\u0443\u0433. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>arc<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>x<\/code> \u0438 <code>y<\/code> \u2014 \u0446\u0435\u043d\u0442\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u2014 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0433\u043e\u043b \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043a\u043e\u043d\u0446\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"javascript\">const roundClearRect = ({ ctx, x, y, width, height, radius }) =&gt; {   ...   ctx.globalCompositeOperation = 'destination-out';    if (radius &gt;= 25) {     ctx.beginPath();     ctx.arc(x + width \/ 2, y + height \/ 2, width \/ 2 - BORDER_WIDTH, 0, 2 * Math.PI);     ctx.closePath();     ctx.fill();   } else {     roundRect({       ctx,       x: x + BORDER_WIDTH,       y: y + BORDER_WIDTH,       width: width - BORDER_WIDTH * 2,       height: height - BORDER_WIDTH * 2,       radius,       fill: true,     });   } };<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 canvas \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f77\/8d2\/87f\/f778d287f16148a9b544830aebd9974c.png\" width=\"1248\" height=\"972\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0431\u0440\u043e\u0441\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0440\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u044c \u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b.<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u0445 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c Retina.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0439 canvas \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443:<\/p>\n<pre><code class=\"javascript\">const PIXEL_RATIO = (function () {   const ctx = document.createElement('canvas').getContext('2d');   const pixelRatio = window.devicePixelRatio || 1;   const backingStorePixelRatio = ctx.webkitBackingStorePixelRatio     || ctx.mozBackingStorePixelRatio     || ctx.msBackingStorePixelRatio     || ctx.oBackingStorePixelRatio     || ctx.backingStorePixelRatio || 1;    return pixelRatio \/ backingStorePixelRatio; }());  function makeCanvasHiPPI(canvas) {   canvas.style.width = `${canvas.width}px`;   canvas.style.height = `${canvas.height}px`;    canvas.width *= PIXEL_RATIO;   canvas.height *= PIXEL_RATIO;    const context = canvas.getContext('2d');   context.scale(PIXEL_RATIO, PIXEL_RATIO);    return context; }<\/code><\/pre>\n<p>\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043a <code>x<\/code> \u0438 <code>y<\/code>.<\/p>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0436\u0438\u0437\u043d\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0433\u0430 (<code>title<\/code>, <code>subtitle<\/code>, <code>header<\/code>, <code>buttons<\/code> \u0438 \u0442.\u043f.), \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0432\u0451\u0440\u0441\u0442\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">const steps = [   target: document.getElementById('first-el'), \tsize: \"large\", \tplacement: \"top\", \talign: \"center\", \ttitle: &lt;div className=\"title\"&gt;\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f&lt;\/div&gt;, \tsubtitle: &lt;div className=\"subtitle\"&gt;\u041f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a&lt;\/div&gt;, \theader: &lt;Image \/&gt; ];  &lt;Onboarding steps={steps} showCounter \/&gt;}<\/code><\/pre>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b7c\/c76\/b5d\/b7cc76b5d1ec4c5285d19067cf9775ba.png\" alt=\"desktop\" title=\"desktop\" width=\"1894\" height=\"1236\"><figcaption>desktop<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b1\/c6e\/fef\/8b1c6efef1d9266080ced20697624fd6.png\" alt=\"mobile\" title=\"mobile\" width=\"1734\" height=\"856\"><figcaption>mobile<\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 (\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c) \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0435 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0439\u0442\u0435 \u0438\u043c. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0438\u043c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c CMS \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f\u043c\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u0430\u0439\u0442\u0443, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044f \u0438\u043c\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<p> \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\/company\/domclick\/blog\/555228\/\"> https:\/\/habr.com\/ru\/company\/domclick\/blog\/555228\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption>(\u0441) Freepik Storyset<\/figcaption><\/figure>\n<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u041a\u043e\u0433\u0442\u0435\u0432, \u044f \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 Web Core \u0432 \u0414\u043e\u043c\u041a\u043b\u0438\u043a. \u041c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/520630\/\">\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0438 \u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u0435\u0440\u0435\u0434 \u043d\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0447\u0438\u0442\u0430\u043b\u0438, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e. \u0410 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0437\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 UI-kit. <\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u041d\u0443\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u0435\u0442 <em>\u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 (onboarding)&nbsp;\u2014 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441&nbsp;\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c.<\/em><\/p>\n<h2>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<ol>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 (hint) \u0438\u043b\u0438 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u043a\u043d\u0430 (modal).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0432\u0438\u0434\u0438\u043c\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u043a\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 (\u043f\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0442\u0451\u043c\u043d\u044b\u0439 overlay.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0441 \u0431\u0435\u043b\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 8 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0438 \u0440\u0430\u0434\u0438\u0443\u0441\u043e\u043c \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0439 \u0432 5 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<h2>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h2>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c:<\/p>\n<ul>\n<li>\n<p>Intro.js<\/p>\n<\/li>\n<li>\n<p>React-joyride<\/p>\n<\/li>\n<li>\n<p>Driver.js<\/p>\n<\/li>\n<li>\n<p>Shepherd<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438, \u043f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c \u0447\u0435\u0441\u0442\u043d\u043e, \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0443\u0434\u0438\u0432\u0438\u043b\u043e. \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043e\u043f\u0438\u0448\u0443 \u043a\u0430\u0436\u0434\u044b\u0439:<\/p>\n<ol>\n<li>\n<p><code>box-shadow: rgba(0, 0, 0, 0.5)&nbsp;0 0 0 5000px;<\/code> \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0442\u0435\u043d\u044c \u0432\u043e\u043a\u0440\u0443\u0433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>outline: 5000px&nbsp;solid&nbsp;rgba(0, 0, 0, .5);<\/code> \u2014 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0440\u0430\u043c\u043a\u0430, \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0449\u0430\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430<\/p>\n<\/li>\n<li>\n<p><code>mix-blend-mode: hard-light;<\/code> \u2014 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 overlay \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 overlay, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0435\u043b\u0430\u044f \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0430. \u0417\u0430\u0442\u0435\u043c \u0446\u0438\u043a\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043f\u043e \u0432\u0441\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043c z-index, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432\u044b\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e SVG-\u043a\u0430\u0440\u0442\u0438\u043d\u043ae \u0441 \u0432\u044b\u0440\u0435\u0437\u043e\u043c \u043f\u043e\u0434 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u0427\u0442\u043e\u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0412\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 SVG, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Canvas.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u043f\u0443\u043d\u043a\u0442\u0430\u043c<\/h2>\n<p>1) \u0421 hint \u0438 modal \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c UI kit&#8217;\u0435 \u0441\u043e \u0441\u0445\u043e\u0436\u0438\u043c API.<\/p>\n<p>2) \u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0438\u0437 kit&#8217;\u0430 \u2014 popper, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f callback \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 (\u0443\u0434\u0430\u0451\u0442\u0441\u044f \u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438), \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<p>3) \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043d\u0430\u0434\u043e \u043b\u0438 \u0434\u043e \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c, \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 utils \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u043e\u043d\u0430 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0432\u0435\u0440\u0445 \u0438\u043b\u0438 \u0432\u043d\u0438\u0437 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u0442\u043e\u0447\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0435\u043d hint + offset) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0446\u0435\u043b\u0438, \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0438 \u043e\u0442\u0441\u0442\u0443\u043f \u043e\u0442 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430:<\/p>\n<pre><code class=\"javascript\">const { top, bottom } = nextElement.getBoundingClientRect();  if (!(top &gt;= offset &amp;&amp; bottom + offset &lt;= document.documentElement.clientHeight)) {   animatedScrollTo({     element: nextElement,     duration,     offset,   }); }<\/code><\/pre>\n<p>4) \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">import React, { useState, useEffect, useRef } from 'react'; import styles from '.\/Onboarding.scss';  const Overlay = ({ targetStyles }) =&gt; {   const [scrollY, setScrollY] = useState(0);   const canvasRef = useRef();    const handleRepaint = () =&gt; {     const canvas = canvasRef.current;      const windowWidth = window.innerWidth;     const windowHeight = window.innerHeight;      canvas.width = windowWidth;     canvas.height = windowHeight;   };    useEffect(handleRepaint, [scrollY, targetStyles]);    useEffect(() =&gt; {     const handleScroll = () =&gt; setScrollY(window.scrollY);      window.addEventListener('scroll', handleScroll);      return () =&gt; {       window.removeEventListener('scroll', handleScroll);     };   }, []);    return (     &lt;div className={styles.overlay}&gt;       &lt;canvas ref={canvasRef} \/&gt;     &lt;\/div&gt;   ); };  export { Overlay };<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0438\u0441\u0443\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/ru.reactjs.org\/docs\/portals.html\">createPortal<\/a>, \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c canvas. \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0446\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432 canvas \u0438 \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u043e \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 <code>fillRect<\/code> \u0441 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439 <code>fillStyle<\/code> \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e <code>globalAlpha<\/code>. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442 \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u043d\u0430 \u0431\u0435\u043b\u044b\u0439 \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">const handleRepaint = () =&gt; {   ...   const context = canvas.getContext('2d');    context.fillStyle = overlayColor;   context.globalAlpha = overlayOpacity;    context.fillRect(0, 0, windowWidth, windowHeight);    context.fillStyle = '#ffffff';   context.globalAlpha = 1; };<\/code><\/pre>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0431\u0435\u043b\u043e\u0439 \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u043e\u0439:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0432 targetStyles \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0431\u0435\u043b\u043e\u0439 \u043e\u0431\u0432\u043e\u0434\u043a\u0438 \/\/ \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f hint'\u0430 \u0431\u0435\u0437 \u0441\u0434\u0432\u0438\u0433\u043e\u0432 const { width, height, top, left } = targetStyles; const x = left - window.scrollX; const y = top - window.scrollY;  roundClearRect({ ctx: context, x, y, width, height, radius });<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0440\u0438\u0441\u0443\u0435\u043c \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0431\u0435\u043b\u043e\u0439 \u0437\u0430\u043b\u0438\u0432\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432\u044b\u0448\u0435, \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u0446\u0435\u043b\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0431\u0435\u043b\u0443\u044e \u043e\u0431\u0432\u043e\u0434\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441\u043e \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f\u043c\u0438, \/\/ \u043f\u0443\u0442\u0451\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0433\u043b\u0430 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \/\/ \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0440\u0438\u0432\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c quadraticCurveTo const roundRect = ({ ctx, x, y, width, height, radius = 5, fill, stroke }) =&gt; {   const bottom = y + height;   const right = x + width;    ctx.beginPath();   ctx.moveTo(x + radius, y);   ctx.lineTo(right - radius, y);   ctx.quadraticCurveTo(right, y, right, y + radius);   ctx.lineTo(right, bottom - radius);   ctx.quadraticCurveTo(right, bottom, right - radius, bottom);   ctx.lineTo(x + radius, bottom);   ctx.quadraticCurveTo(x, bottom, x, bottom - radius);   ctx.lineTo(x, y + radius);   ctx.quadraticCurveTo(x, y, x + radius, y);   ctx.closePath();   if (fill) {     ctx.fill();   }   if (stroke) {     ctx.stroke();   } };  const roundClearRect = ({ ctx, x, y, width, height, radius }) =&gt; {   roundRect({     ctx,     x,     y,     width,     height,     radius: 5,     fill: true,   });   ... };<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e <code>globalCompositeOperation = 'destination-out'<\/code>. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c Canvas-\u0441\u043b\u043e\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041e\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0438\u0441\u0443\u0435\u0442 \u0441\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u0432 25 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u0443\u0433\u043b\u0443\u044e \u0438\u043a\u043e\u043d\u043a\u0443, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 25 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u043a\u0440\u0443\u0433. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>arc<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>x<\/code> \u0438 <code>y<\/code> \u2014 \u0446\u0435\u043d\u0442\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u2014 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0434\u0438\u0443\u0441, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0433\u043e\u043b \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043a\u043e\u043d\u0446\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"javascript\">const roundClearRect = ({ ctx, x, y, width, height, radius }) =&gt; {   ...   ctx.globalCompositeOperation = 'destination-out';    if (radius &gt;= 25) {     ctx.beginPath();     ctx.arc(x + width \/ 2, y + height \/ 2, width \/ 2 - BORDER_WIDTH, 0, 2 * Math.PI);     ctx.closePath();     ctx.fill();   } else {     roundRect({       ctx,       x: x + BORDER_WIDTH,       y: y + BORDER_WIDTH,       width: width - BORDER_WIDTH * 2,       height: height - BORDER_WIDTH * 2,       radius,       fill: true,     });   } };<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 canvas \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0431\u0440\u043e\u0441\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0440\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u044c \u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b.<\/p>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u0445 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c Retina.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043b\u043e\u0436\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0430\u0437\u043c\u044b\u0442\u043e\u0441\u0442\u0438 \u0440\u0435\u0448\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u043e\u0439 canvas \u043d\u0430 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443:<\/p>\n<pre><code class=\"javascript\">const PIXEL_RATIO = (function () {   const ctx = document.createElement('canvas').getContext('2d');   const pixelRatio = window.devicePixelRatio || 1;   const backingStorePixelRatio = ctx.webkitBackingStorePixelRatio     || ctx.mozBackingStorePixelRatio     || ctx.msBackingStorePixelRatio     || ctx.oBackingStorePixelRatio     || ctx.backingStorePixelRatio || 1;    return pixelRatio \/ backingStorePixelRatio; }());  function makeCanvasHiPPI(canvas) {   canvas.style.width = `${canvas.width}px`;   canvas.style.height = `${canvas.height}px`;    canvas.width *= PIXEL_RATIO;   canvas.height *= PIXEL_RATIO;    const context = canvas.getContext('2d');   context.scale(PIXEL_RATIO, PIXEL_RATIO);    return context; }<\/code><\/pre>\n<p>\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u043f\u0438\u043a\u0441\u0435\u043b\u044f \u043a <code>x<\/code> \u0438 <code>y<\/code>.<\/p>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0436\u0438\u0437\u043d\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0433\u0430 (<code>title<\/code>, <code>subtitle<\/code>, <code>header<\/code>, <code>buttons<\/code> \u0438 \u0442.\u043f.), \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0432\u0451\u0440\u0441\u0442\u043a\u0443:<\/p>\n<pre><code class=\"javascript\">const steps = [   target: document.getElementById('first-el'), \tsize: \"large\", \tplacement: \"top\", \talign: \"center\", \ttitle: &lt;div className=\"title\"&gt;\u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f&lt;\/div&gt;, \tsubtitle: &lt;div className=\"subtitle\"&gt;\u041f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a&lt;\/div&gt;, \theader: &lt;Image \/&gt; ];  &lt;Onboarding steps={steps} showCounter \/&gt;}<\/code><\/pre>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h2>\n<figure class=\"full-width\"><figcaption>desktop<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>mobile<\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 (\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c) \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0435 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0439\u0442\u0435 \u0438\u043c. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0438\u043c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c CMS \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044f\u043c\u0438 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0441\u0430\u0439\u0442\u0443, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044f \u0438\u043c\u0438. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<p> \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\/company\/domclick\/blog\/555228\/\"> https:\/\/habr.com\/ru\/company\/domclick\/blog\/555228\/<\/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-322535","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322535","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=322535"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322535\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}