
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
@cypress-design/vue-icon
Advanced tools
npm install @cypress-design/vue-icon
or with yarn
yarn add @cypress-design/vue-icon
import Icon from '@cypress-design/vue-icon'
2 methods exist to load this component:
Use named imports of each icon you plan on using. I recommend this method because:
<script setup>
import { IconObjectBookCode } from '@cypress-design/vue-icon'
</script>
<template>
<IconObjectBookCode />
</template>
Import the default Icon
component and pass the name of the icon. It can be useful but you should avoid it in production unless you know what you are doing.
It has advantages:
But drawbacks too:
<script setup>
import Icon from '@cypress-design/vue-icon'
</script>
<template>
<Icon name="object-book-code" />
</template>
Should you need to change the color of the icon on hover
or focus
prefix the props with these words.
Here, the strokeColor
will change on hover from indigo to jade
<script setup>
import { IconObjectBook } from '@cypress-design/vue-icon'
</script>
<template>
<button class="flex items-center gap-[8px]">
<IconObjectBook
size="16"
strokeColor="blue-600"
hoverStrokeColor="jade-600"
/>Read
</button>
</template>
If you need the hover
or focus
effect to be triggered on the parent group, use interactiveColorsOnGroup
.
This prop will change all the pseudo prefixes to be group focused instead of triggered by the icon itself.
To achieve the same goal, in WindiCSS, we would use group-hover:
instead of hover:
.
<script setup>
import { IconObjectBook } from '@cypress-design/vue-icon'
</script>
<template>
<button class="group hover:text-jade-800 flex items-center gap-[8px]">
<IconObjectBook
size="16"
strokeColor="blue-600"
hoverStrokeColor="jade-600"
interactiveColorsOnGroup
/>Read
</button>
</template>
FAQs
## Install
The npm package @cypress-design/vue-icon receives a total of 2,206 weekly downloads. As such, @cypress-design/vue-icon popularity was classified as popular.
We found that @cypress-design/vue-icon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.