3.1.0 • Published 5 months ago

ngx-resizeable v3.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

šŸš€ Angular Resizable Directive

Easily make any HTML element resizable in your Angular applications using this lightweight and efficient directive. Perfect for creating dynamic layouts, dashboards, or any component that requires user-controlled resizing.

šŸŽÆ Features

āœ… Resize elements from any edge (top, bottom, left, right)
āœ… Emits events for resize start, resizing, and resize end
āœ… Works seamlessly with Angular's rendering system
āœ… Supports ghost resizing (visual feedback without actual resizing)
āœ… Easily enable/disable resizing dynamically

šŸ“¦ Installation

npm i ngx-resizeable

šŸš€ Usage

1⃣ Import the Directive

import { Resizable } from 'ngx-resizeable';

2⃣ Add to Your Component

<div resizable [edges]="{ right: true, bottom: true }" (resizeStart)="onResizeStart($event)" (resizing)="onResizing($event)" (resizeEnd)="onResizeEnd($event)">
  Resizable Content
</div>

3⃣ Handle Resize Events

onResizeStart(event: ResizeEvent) {
  console.log('Resize started:', event);
}

onResizing(event: ResizeEvent) {
  console.log('Resizing:', event);
}

onResizeEnd(event: ResizeEvent) {
  console.log('Resize ended:', event);
}

šŸŽØ Customization

You can customize the directive using the following inputs:

InputTypeDescription
edgesEdgesDefines which edges are resizable (e.g., { right: true, bottom: true }).
ghostResizebooleanEnables ghost resizing (visual feedback without changing size).
disableResizebooleanDisables resizing when set to true.

🌜 Events

Event NamePayloadDescription
resizeStartResizeEventFires when resizing starts.
resizingResizeEventFires while resizing is in progress.
resizeEndResizeEventFires when resizing ends.

šŸ”¢ Version Guide

VersionAngular Version
v1.xAngular 17
v2.xAngular 18
v3.xAngular 19

Make sure to install the correct version based on your Angular version:

npm install ngx-resizeable@^3.0.0  # For Angular 19
npm install ngx-resizeable@^2.0.0  # For Angular 18
npm install ngx-resizeable@^1.0.0  # For Angular 17

šŸ› ļø Contributing

We welcome contributions! Feel free to submit issues, feature requests, or pull requests.

šŸ“ License

MIT License Ā© 2025 Harsh Kanjiya


šŸš€ Level up your Angular applications with flexible resizing!