arrow-down-on-square
heroicons-animated-angular/arrow-down-on-squareFreeComponent
Animated arrow-down-on-square icon for Angular
Live preview
live · rendered by the registry
Rendered by heroicons-animated-angular on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://angular.heroicons-animated.com/r/arrow-down-on-square.jsonSource
1import {2 ChangeDetectionStrategy,3 Component,4 computed,5 input,6 signal,7} from "@angular/core";89@Component({10 selector: "hi-arrow-down-on-square",11 standalone: true,12 changeDetection: ChangeDetectionStrategy.OnPush,13 host: {14 "[attr.aria-label]": "'arrow-down-on-square'",15 role: "img",16 "(mouseenter)": "onMouseEnter()",17 "(mouseleave)": "onMouseLeave()",18 },19 template: `<svg20 xmlns="http://www.w3.org/2000/svg"21 [attr.width]="size()"22 [attr.height]="size()"23 viewBox="0 0 24 24"24 fill="none"25 [attr.stroke]="color()"26 [attr.stroke-width]="strokeWidth()"27 stroke-linecap="round"28 stroke-linejoin="round"29 class="icon-svg"30 >31 <path32 d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15"33 />34 <path class="arrow-path" [class.animate]="shouldAnimate()" d="M9 12l3 3m0 0 3-3m-3 3V2.25" />35 </svg>`,36 styles: [37 `38 :host {39 display: inline-block;40 }4142 .icon-svg {43 transform-box: fill-box;44 transform-origin: center;45 }4647 .arrow-path {48 transform-box: fill-box;49 transform-origin: center;50 transition: transform 0.4s ease-in-out;51 }5253 .arrow-path.animate {54 animation: arrow-translate 0.4s ease-in-out forwards;55 }5657 @keyframes arrow-translate {58 0% {59 transform: translateY(0);60 }61 33% {62 transform: translateY(-2px);63 }64 66% {65 transform: translateY(2px);66 }67 100% {68 transform: translateY(0);69 }70 }71 `,72 ],73})74export class ArrowDownOnSquareIcon {75 readonly color = input("currentColor");76 readonly size = input(28);77 readonly strokeWidth = input(1.5);78 readonly animate = input(false);7980 protected isHovered = signal(false);81 protected shouldAnimate = computed(() => this.animate() || this.isHovered());8283 onMouseEnter() {84 this.isHovered.set(true);85 }8687 onMouseLeave() {88 this.isHovered.set(false);89 }90}
Files it writes
More from heroicons-animated-angular
All 316 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| academic-capacademic-cap | heroicons-animated-angular | Components | Free | no deps | |
| adjustments-horizontaladjustments-horizontal | heroicons-animated-angular | Components | Free | no deps | |
| adjustments-verticaladjustments-vertical | heroicons-animated-angular | Components | Free | no deps | |
| archive-boxarchive-box | heroicons-animated-angular | Components | Free | no deps | |
| archive-box-arrow-downarchive-box-arrow-down | heroicons-animated-angular | Components | Free | no deps | |
| archive-box-x-markarchive-box-x-mark | heroicons-animated-angular | Components | Free | no deps | |
| arrow-downarrow-down | heroicons-animated-angular | Components | Free | no deps | |
| arrow-down-circlearrow-down-circle | heroicons-animated-angular | Components | Free | no deps |
