<?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: Mahdi-Movahedian-Atar</title>
    <description>The latest articles on DEV Community by Mahdi-Movahedian-Atar (@mahdimovahedianatar).</description>
    <link>https://dev.to/mahdimovahedianatar</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%2F2206651%2F2a33907e-8971-4e6e-bf66-0ab39e1143db.png</url>
      <title>DEV Community: Mahdi-Movahedian-Atar</title>
      <link>https://dev.to/mahdimovahedianatar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahdimovahedianatar"/>
    <language>en</language>
    <item>
      <title>Corrosive Components: A New component library for qwik</title>
      <dc:creator>Mahdi-Movahedian-Atar</dc:creator>
      <pubDate>Fri, 18 Oct 2024 21:29:44 +0000</pubDate>
      <link>https://dev.to/mahdimovahedianatar/corrosive-components-a-new-component-library-for-qwik-3ko6</link>
      <guid>https://dev.to/mahdimovahedianatar/corrosive-components-a-new-component-library-for-qwik-3ko6</guid>
      <description>&lt;h2&gt;
  
  
  Why Corrosive Components
&lt;/h2&gt;

&lt;p&gt;As a web developer passionate about performance, I wanted a set of components that took full advantage of Qwik’s resumable nature. That’s why I created &lt;a href="https://corrosive.dev/" rel="noopener noreferrer"&gt;corrosive components&lt;/a&gt;, a library tailored specifically for Qwik to make building performant and interactive UIs a breeze that is feature-complete, easy to use, and independent of any other packages.&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%2F9rzrzofxdg0o5muk8dh4.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%2F9rzrzofxdg0o5muk8dh4.PNG" alt="Dark Mode" width="670" height="691"&gt;&lt;/a&gt;&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%2Fh0bveoxpomwl4v0nh493.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%2Fh0bveoxpomwl4v0nh493.PNG" alt="Light Mode" width="671" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Corrosive Components
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installation via NPM or Bun
&lt;/h3&gt;

&lt;p&gt;You can install the Crossive Components library using npm or bun. Run the following command in your project directory:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install crossive-components&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bun install crossive-components&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add &lt;code&gt;useStyles(DefaultStyle)&lt;/code&gt; with &lt;code&gt;useStyles(DefaultResources)&lt;/code&gt; or &lt;code&gt;useStyles(DefaultDarkResources)&lt;/code&gt; to the root layout element to apply styles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
  DefaultResources, // or(DefaultDarkResources)
  DefaultStyle,
} from 'corrosive-components'

export default component$(() =&amp;gt; {
  useStyles$(DefaultResources) // or(useStyles$(DefaultDarkResources))
  useStyles$(DefaultStyle)

  return (
    // content
  )
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Checkout &lt;a href="https://corrosive.dev/docs/installation/installation/" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt; for more&lt;/p&gt;

&lt;h3&gt;
  
  
  Directly Copying Component Source Code
&lt;/h3&gt;

&lt;p&gt;If you prefer not to install the package, you can directly copy the source code for individual components and their styles and use them in your project.&lt;/p&gt;

&lt;p&gt;Note that you still need to add &lt;code&gt;DefaultResources&lt;/code&gt; or &lt;code&gt;DefaultDarkResources&lt;/code&gt; to the root layout element.&lt;br&gt;
Styling Overview&lt;/p&gt;

&lt;p&gt;Styles in corrosive components consist of two parts, Resources which contain the variables and Styles which contain the regular styles.&lt;/p&gt;

&lt;p&gt;Default style is &lt;code&gt;DefaultStyle&lt;/code&gt; and resources are &lt;code&gt;DefaultResources&lt;/code&gt; and &lt;code&gt;DefaultDarkResources&lt;/code&gt; which are compiled inline CSS files.&lt;/p&gt;

&lt;p&gt;Checkout &lt;a href="https://corrosive.dev/docs/installation/styling/" rel="noopener noreferrer"&gt;styling guide&lt;/a&gt; for more&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Corrosive Components
&lt;/h2&gt;

&lt;p&gt;This article was written by &lt;a href="https://corrosive.dev/info/" rel="noopener noreferrer"&gt;Mahdi Movahedian Atar&lt;/a&gt;, the developer and maintainer of corrosive components.&lt;/p&gt;

</description>
      <category>qwik</category>
      <category>webcomponents</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
