<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmad Addel</title>
    <description>The latest articles on DEV Community by Ahmad Addel (@a4addel).</description>
    <link>https://dev.to/a4addel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F923889%2F579a135c-f810-4ee8-b50f-558e145b358f.jpeg</url>
      <title>DEV Community: Ahmad Addel</title>
      <link>https://dev.to/a4addel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/a4addel"/>
    <language>en</language>
    <item>
      <title>How to use framer-motion with ant design</title>
      <dc:creator>Ahmad Addel</dc:creator>
      <pubDate>Tue, 04 Oct 2022 08:24:26 +0000</pubDate>
      <link>https://dev.to/a4addel/how-to-use-framer-motion-with-ant-design-57j5</link>
      <guid>https://dev.to/a4addel/how-to-use-framer-motion-with-ant-design-57j5</guid>
      <description>&lt;p&gt;ant design does not support integration with framer-motion , that's what you will need a work-around.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pass the &lt;code&gt;motion.div&lt;/code&gt; (or any other component) to the and.design as &lt;code&gt;component&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzz1ojncm98hrvcku2v99.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzz1ojncm98hrvcku2v99.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now you can destructure the framer-motion object into the antd component and it will work just fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrypu950jyjxofdurf7n.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrypu950jyjxofdurf7n.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you are using TS and need the auto complete feature, just create a function that takes&lt;code&gt;AnimationProps&lt;/code&gt; as as parameter to return it again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75r964tk5vlckamw2ekj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75r964tk5vlckamw2ekj.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Final result&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8b405kvthgcgrso40vk3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8b405kvthgcgrso40vk3.PNG" alt="Final result"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Code&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { motion, AnimationProps } from "framer-motion";
const Animation = (props: AnimationProps) =&amp;gt; props;
&amp;lt;Form component={motion.form} {...Animation({ /* Here */})}&amp;gt;&amp;lt;/Form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>react</category>
      <category>javascript</category>
      <category>antd</category>
    </item>
  </channel>
</rss>
