
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@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 3,031 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.