
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
@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,420 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.