<?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: Laur.Rvt</title>
    <description>The latest articles on DEV Community by Laur.Rvt (@laurrvt).</description>
    <link>https://dev.to/laurrvt</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F549382%2F428b5940-1ac1-4e5e-b944-6fb730dbdf42.jpg</url>
      <title>DEV Community: Laur.Rvt</title>
      <link>https://dev.to/laurrvt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laurrvt"/>
    <language>en</language>
    <item>
      <title>Read More/Read Less functionality with Vue</title>
      <dc:creator>Laur.Rvt</dc:creator>
      <pubDate>Wed, 26 May 2021 19:00:35 +0000</pubDate>
      <link>https://dev.to/laurrvt/read-more-read-less-functionality-with-vue-3km0</link>
      <guid>https://dev.to/laurrvt/read-more-read-less-functionality-with-vue-3km0</guid>
      <description>&lt;p&gt;Hi!&lt;br&gt;
In this post I am going to show you a simple way to do a Read More/Read Less functionality in vue.js.&lt;/p&gt;

&lt;p&gt;One way to do that is to have two divs that will store both versions of the text (the long and the short one) but that is working only if we work with static texts.&lt;/p&gt;

&lt;p&gt;This is a working version of that functionality using a variable in which will be stored our text:&lt;br&gt;
&lt;a href="https://codesandbox.io/s/eager-kowalevski-u406b?file=/src/App.vue"&gt;https://codesandbox.io/s/eager-kowalevski-u406b?file=/src/App.vue&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The idea is pretty simple. I just have a bool variable named "readMore" which will control displaying of Read More and Read Less buttons. Also, using readMore ,I give to div that stores the text a new class named "readLess" which have it own styles.&lt;br&gt;
Hope it was useful for you. If you have any questions or suggestions, feel free to text me about that :)&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
