@ngu/magnify
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Magnify

Magnify directive helps to magnify the image on mouse hover. Currently it is only work if z is pressed and hover on image.

To implement this directive, you need to add magnify attribute to the image tag.

import { Magnify } from '@ngu/magnify';

@NgModule({
  Imports: [
    Magnify
  ]
})
export class AppModule {}

Or You can use it on standalone component.

import { Magnify } from '@ngu/magnify';

@Component({
  standalone: true,
  imports: [
    Magnify
  ],
  selector: 'app',
  ...
})
<img src="image.jpg" magnify />

<!-- You can make the inline false (Default: true) -->
<img src="image.jpg" magnify [inline]="false" [scale]="3" />

<!-- You can specify different image too -->
<img src="thumnail.jpg" magnify="original.jpg" />

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i @ngu/magnify

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

80.7 kB

Total Files

14

Last publish

Collaborators

  • ngu