A percent icon that draws itself on hover and spins into a round discount badge when a discount is applied, and back when it is removed.
React + HTML
무료
상태
아래에 더 있어요 ↓
기본 제공
제공 내용
라이트 및 다크사용 중인 테마 색상 적용
패키지…
코드 크기…
변경할 때마다 검사
타입 검사TypeScript strict 모드
린트 및 포맷ESLint · Prettier
테스트 및 빌드라이트/다크 스크린샷
보안 감사높음 또는 심각 등급 권고 없음
패키지 공개 기간모든 버전 공개 후 7일 이상
대기 시 CPU대기 시 코어 절반 미만, 30 fps 이하
코드
이 컴포넌트에 이상한 점이 있나요? 피드백 보내기 ›
percent-iconHTML
index.htmlpageThe markup to copy, between the copy-from-here comments, on a demo page.
style.cssstyleThe styles: copy them into your CSS.
script.jsscriptThe behavior: load it after the markup.
index.html
The markup to copy, between the copy-from-here comments, on a demo page.
불러오는 중…
이럴 때 좋아요
Discount, sale and promo toggles in carts, checkouts and pricing pages.
작동 방식
Hover it and the slash draws in, then the two circles. Apply it and the sign spins half a turn as it shrinks, a ring draws round it like a badge and its circles fill in the result color; remove it and it goes back.
사용 방법
페이지에서 style.css 및 script.js 파일을 연결한 다음, index.html의 마크업을 원하는 위치에 붙여 넣으세요.