import { KbqResizerModule } from '@koobiq/components/resizer';Directive (container) sets whether the element is resizable.
<div kbqResizable>
<div [kbqResizer]="[-1, 0]"></div>
</div>@Directive({ selector: '[kbqResizable]', exportAs: 'kbqResizable' })
class KbqResizable {}Directive which defines element resizing direction.
@Directive({ selector: '[kbqResizer]', exportAs: 'kbqResizer' })
class KbqResizer {
readonly direction = input.required<KbqResizerDirection>({
alias: 'kbqResizer'
});
readonly cursor = input<string | null>(null);
readonly disableSizeUpdate = input<boolean>(false);
readonly resizeStart = output<KbqResizerSizeChangeEvent>();
readonly sizeChange = output<KbqResizerSizeChangeEvent>();
}kbqResizerKbqResizerDirection Direction of element resizing.
cursorstring | null Overrides the cursor that is otherwise derived from the resizing direction.
disableSizeUpdateboolean Stops the directive from writing the new size onto the resizable element, leaving the host in
control: resizeStart and sizeChange still report the size the drag asks for, and the
host decides what to apply. Use it when the element's size is owned by a layout the directive must
not fight — KbqSplitter sizes its panels through a grid template on their common parent.
The reported size stays measured from where the drag started rather than from the element, so a host that clamps or ignores a move does not accumulate drift over the rest of the drag.
resizeStartKbqResizerSizeChangeEvent Emits the element size when a pointer drag begins, after the directive has committed to the resize.
sizeChangeKbqResizerSizeChangeEvent Emits the new size of the element after resizing.
Directions for resizing.
Horizontal direction (x):
Vertical direction (y):
type KbqResizerDirection = [x: -1 | 0 | 1, y: -1 | 0 | 1];Event emitted when the size of the resizable element changes.
type KbqResizerSizeChangeEvent = {
width: number;
height: number;
};