ngx-kit 6.2.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/angle-selector/README.md +34 -34
- package/box-shadow/README.md +33 -33
- package/color-picker/README.md +52 -49
- package/data-table/README.md +120 -113
- package/date-picker/README.md +74 -69
- package/dialog/README.md +92 -92
- package/drag-resize/README.md +55 -0
- package/drawer-menu/README.md +125 -77
- package/dropzone/README.md +422 -422
- package/fesm2022/ngx-kit-angle-selector.mjs +2 -2
- package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
- package/fesm2022/ngx-kit-box-shadow.mjs +2 -2
- package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
- package/fesm2022/ngx-kit-color-picker.mjs +265 -73
- package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-data-table.mjs +2 -2
- package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
- package/fesm2022/ngx-kit-date-picker.mjs +11 -11
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-dialog.mjs +3 -3
- package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
- package/fesm2022/ngx-kit-drag-resize.mjs +1664 -0
- package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -0
- package/fesm2022/ngx-kit-drawer-menu.mjs +424 -158
- package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-dropzone.mjs +2 -2
- package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
- package/fesm2022/ngx-kit-form-field.mjs +3 -5
- package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
- package/fesm2022/ngx-kit-gallery.mjs +2 -2
- package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
- package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-grid-layout.mjs +927 -0
- package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -0
- package/fesm2022/ngx-kit-image-editor.mjs +2 -2
- package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
- package/fesm2022/ngx-kit-menu.mjs +8 -8
- package/fesm2022/ngx-kit-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-message.mjs +2 -2
- package/fesm2022/ngx-kit-message.mjs.map +1 -1
- package/fesm2022/ngx-kit-notify.mjs +2 -2
- package/fesm2022/ngx-kit-notify.mjs.map +1 -1
- package/fesm2022/ngx-kit-shared.mjs +54 -3
- package/fesm2022/ngx-kit-shared.mjs.map +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs +2 -2
- package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-virtual-scroll.mjs +392 -0
- package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -0
- package/fesm2022/ngx-kit-webflow.mjs +709 -0
- package/fesm2022/ngx-kit-webflow.mjs.map +1 -0
- package/gallery/README.md +71 -71
- package/gradient-picker/README.md +41 -41
- package/grid-layout/README.md +64 -0
- package/image-editor/README.md +12 -12
- package/menu/README.md +85 -85
- package/message/README.md +70 -70
- package/notify/README.md +56 -58
- package/package.json +17 -1
- package/shared/README.md +117 -117
- package/time-picker/README.md +89 -95
- package/types/ngx-kit-color-picker.d.ts +72 -16
- package/types/ngx-kit-date-picker.d.ts +2 -1
- package/types/ngx-kit-drag-resize.d.ts +368 -0
- package/types/ngx-kit-drawer-menu.d.ts +148 -88
- package/types/ngx-kit-grid-layout.d.ts +310 -0
- package/types/ngx-kit-image-editor.d.ts +1 -1
- package/types/ngx-kit-shared.d.ts +12 -1
- package/types/ngx-kit-virtual-scroll.d.ts +179 -0
- package/types/ngx-kit-webflow.d.ts +286 -0
- package/virtual-scroll/README.md +199 -0
package/dialog/README.md
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
# ngx-kit/dialog
|
|
2
|
-
|
|
3
|
-
Modal/dialog built on the browser's native `<dialog>` — no manual overlay, no third-party library.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install ngx-kit
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Setup
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
// app.config.ts
|
|
15
|
-
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
16
|
-
import { NgxDialogModule } from 'ngx-kit/dialog';
|
|
17
|
-
|
|
18
|
-
export const appConfig: ApplicationConfig = {
|
|
19
|
-
providers: [importProvidersFrom(NgxDialogModule)],
|
|
20
|
-
};
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Opening a dialog
|
|
24
|
-
|
|
25
|
-
With the static API (no manual service injection needed):
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
import { Dialog } from 'ngx-kit/dialog';
|
|
29
|
-
|
|
30
|
-
const ref = Dialog.open(MyDialogComponent, {
|
|
31
|
-
data: { userId: 42 },
|
|
32
|
-
width: '480px',
|
|
33
|
-
allowCloseOnOutsideClick: true,
|
|
34
|
-
header: { enable: true, title: 'Edit user', showCloseButton: true },
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
ref.afterClosed.subscribe((result) => console.log('Result:', result));
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Inside the dialog's component:
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
@Component({ ... })
|
|
44
|
-
export class MyDialogComponent {
|
|
45
|
-
private ref = inject(NgxDialogRef);
|
|
46
|
-
data = inject(NGX_DIALOG_DATA); // the data passed via config.data
|
|
47
|
-
|
|
48
|
-
save() {
|
|
49
|
-
this.ref.close({ saved: true });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Layout directives inside a dialog
|
|
55
|
-
|
|
56
|
-
```html
|
|
57
|
-
<div *ngxDialogHeader>Custom title</div>
|
|
58
|
-
<div *ngxDialogBody>Main content</div>
|
|
59
|
-
<div *ngxDialogFooter>
|
|
60
|
-
<button (click)="save()">Save</button>
|
|
61
|
-
</div>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## API
|
|
65
|
-
|
|
66
|
-
### `Dialog.open<T>(component, config?)`
|
|
67
|
-
|
|
68
|
-
| `config` field
|
|
69
|
-
|
|
|
70
|
-
| `data`
|
|
71
|
-
| `allowCloseOnOutsideClick`
|
|
72
|
-
| `containerClass`
|
|
73
|
-
| `header.enable` / `header.title` / `header.showCloseButton` |
|
|
74
|
-
| `footer.enable`
|
|
75
|
-
| `width` / `minWidth` / `maxWidth`
|
|
76
|
-
| `height` / `minHeight` / `maxHeight`
|
|
77
|
-
| `injector`
|
|
78
|
-
|
|
79
|
-
### `NgxDialogRef`
|
|
80
|
-
|
|
81
|
-
| Member
|
|
82
|
-
|
|
|
83
|
-
| `close(result?)`
|
|
84
|
-
| `afterClosed: Observable<any>` | Emits `result` after the dialog closes
|
|
85
|
-
|
|
86
|
-
## SSR note
|
|
87
|
-
|
|
88
|
-
`Dialog.open(...)` is a static/global API that's perfectly safe for a typical browser app. If you're using Angular SSR, this static instance is shared across concurrent server requests — instead of the static API, inject `NgxOverlayService` directly (which is per-injector/per-request safe).
|
|
89
|
-
|
|
90
|
-
## Dark mode and RTL
|
|
91
|
-
|
|
92
|
-
Supported automatically (`light-dark()` + CSS logical properties).
|
|
1
|
+
# ngx-kit/dialog
|
|
2
|
+
|
|
3
|
+
Modal/dialog built on the browser's native `<dialog>` — no manual overlay, no third-party library.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install ngx-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// app.config.ts
|
|
15
|
+
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
16
|
+
import { NgxDialogModule } from 'ngx-kit/dialog';
|
|
17
|
+
|
|
18
|
+
export const appConfig: ApplicationConfig = {
|
|
19
|
+
providers: [importProvidersFrom(NgxDialogModule)],
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Opening a dialog
|
|
24
|
+
|
|
25
|
+
With the static API (no manual service injection needed):
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { Dialog } from 'ngx-kit/dialog';
|
|
29
|
+
|
|
30
|
+
const ref = Dialog.open(MyDialogComponent, {
|
|
31
|
+
data: { userId: 42 },
|
|
32
|
+
width: '480px',
|
|
33
|
+
allowCloseOnOutsideClick: true,
|
|
34
|
+
header: { enable: true, title: 'Edit user', showCloseButton: true },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
ref.afterClosed.subscribe((result) => console.log('Result:', result));
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Inside the dialog's component:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
@Component({ ... })
|
|
44
|
+
export class MyDialogComponent {
|
|
45
|
+
private ref = inject(NgxDialogRef);
|
|
46
|
+
data = inject(NGX_DIALOG_DATA); // the data passed via config.data
|
|
47
|
+
|
|
48
|
+
save() {
|
|
49
|
+
this.ref.close({ saved: true });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Layout directives inside a dialog
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<div *ngxDialogHeader>Custom title</div>
|
|
58
|
+
<div *ngxDialogBody>Main content</div>
|
|
59
|
+
<div *ngxDialogFooter>
|
|
60
|
+
<button (click)="save()">Save</button>
|
|
61
|
+
</div>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## API
|
|
65
|
+
|
|
66
|
+
### `Dialog.open<T>(component, config?)`
|
|
67
|
+
|
|
68
|
+
| `config` field | Type | Default | Description |
|
|
69
|
+
| ----------------------------------------------------------- | ---------- | ----------- | ---------------------------------------------- |
|
|
70
|
+
| `data` | `T` | `{}` | Data passed to the component inside the dialog |
|
|
71
|
+
| `allowCloseOnOutsideClick` | `boolean` | `false` | Close when clicking the backdrop |
|
|
72
|
+
| `containerClass` | `string` | `'ngx-kit'` | Extra class on the container |
|
|
73
|
+
| `header.enable` / `header.title` / `header.showCloseButton` | | | Default header settings |
|
|
74
|
+
| `footer.enable` | `boolean` | | Show the default footer |
|
|
75
|
+
| `width` / `minWidth` / `maxWidth` | `string` | | Horizontal sizing |
|
|
76
|
+
| `height` / `minHeight` / `maxHeight` | `string` | | Vertical sizing |
|
|
77
|
+
| `injector` | `Injector` | | Custom injector for the inner component |
|
|
78
|
+
|
|
79
|
+
### `NgxDialogRef`
|
|
80
|
+
|
|
81
|
+
| Member | Description |
|
|
82
|
+
| ------------------------------ | --------------------------------------------------- |
|
|
83
|
+
| `close(result?)` | Closes the dialog, optionally passing back a result |
|
|
84
|
+
| `afterClosed: Observable<any>` | Emits `result` after the dialog closes |
|
|
85
|
+
|
|
86
|
+
## SSR note
|
|
87
|
+
|
|
88
|
+
`Dialog.open(...)` is a static/global API that's perfectly safe for a typical browser app. If you're using Angular SSR, this static instance is shared across concurrent server requests — instead of the static API, inject `NgxOverlayService` directly (which is per-injector/per-request safe).
|
|
89
|
+
|
|
90
|
+
## Dark mode and RTL
|
|
91
|
+
|
|
92
|
+
Supported automatically (`light-dark()` + CSS logical properties).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ngx-kit drag-resize
|
|
2
|
+
|
|
3
|
+
## Design goals
|
|
4
|
+
|
|
5
|
+
The package uses Angular 22 signals and Pointer Events. Dragging and resizing remain transform/pointer based, while drop-list sorting uses live DOM geometry.
|
|
6
|
+
|
|
7
|
+
### Professional drop-list behavior
|
|
8
|
+
|
|
9
|
+
When a drag starts inside a drop list:
|
|
10
|
+
|
|
11
|
+
- the real item remains in its original DOM position as a hidden layout anchor;
|
|
12
|
+
- exactly one placeholder preserves the item's layout space;
|
|
13
|
+
- a fully styled visual clone is moved to `document.body`, so overflow/scroll containers cannot clip the drag;
|
|
14
|
+
- the body preview copies computed styles recursively, including CSS custom properties and descendant styles;
|
|
15
|
+
- entering, leaving and switching lists always disposes the previous placeholder before creating the next one;
|
|
16
|
+
- sorting uses current DOM geometry instead of stale start-of-drag rectangles;
|
|
17
|
+
- `previousIndex` is captured from the origin list and `currentIndex` is the final placeholder position;
|
|
18
|
+
- dropping outside every connected list cancels the drag instead of accidentally committing it;
|
|
19
|
+
- auto-scroll follows the currently hovered drop list.
|
|
20
|
+
|
|
21
|
+
## Basic drop list
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div NgxDropList (drop)="onDrop($event)">
|
|
25
|
+
@for (item of items; track item.id) {
|
|
26
|
+
<article NgxDraggable [data]="item">
|
|
27
|
+
{{ item.name }}
|
|
28
|
+
</article>
|
|
29
|
+
}
|
|
30
|
+
</div>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For most UIs, wrap related lists in `NgxDropListGroup` so they are connected automatically:
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<div NgxDropListGroup>
|
|
37
|
+
<div NgxDropList>...</div>
|
|
38
|
+
<div NgxDropList>...</div>
|
|
39
|
+
<div NgxDropList>...</div>
|
|
40
|
+
</div>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The emitted event follows the familiar `previousIndex/currentIndex` model, making it suitable for `moveItemInArray` / `transferArrayItem` style data updates.
|
|
44
|
+
|
|
45
|
+
## Resize
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<article
|
|
49
|
+
NgxResizable
|
|
50
|
+
[minWidth]="120"
|
|
51
|
+
[minHeight]="80"
|
|
52
|
+
[directions]="['n','e','s','w','ne','se','sw','nw']"></article>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Resize is pointer based, supports all eight directions, minimum/maximum constraints and optional pixel snapping.
|
package/drawer-menu/README.md
CHANGED
|
@@ -1,77 +1,125 @@
|
|
|
1
|
-
# ngx-kit/drawer-menu
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
##
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
# ngx-kit/drawer-menu
|
|
2
|
+
|
|
3
|
+
A gesture-first Angular navigation drawer designed for desktop and mobile.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- Logical `start` / `end` placement with RTL/LTR support.
|
|
8
|
+
- Mouse + touch + pen drag using Pointer Events.
|
|
9
|
+
- Open from the screen edge when closed.
|
|
10
|
+
- Drag the drawer itself to close it.
|
|
11
|
+
- Live 0..1 gesture progress — effects react while dragging.
|
|
12
|
+
- Fabric / curtain / spring / elastic effects.
|
|
13
|
+
- `overlay`, `push`, and `reveal` content modes.
|
|
14
|
+
- Desktop/mobile responsive state.
|
|
15
|
+
- True docked desktop sidebar: open means it occupies layout space and clicking the page never closes it.
|
|
16
|
+
- Mobile overlay behavior with backdrop and edge swipe.
|
|
17
|
+
- Pin/unpin support.
|
|
18
|
+
- Controlled state with `[(open)]`.
|
|
19
|
+
- Reduced-motion support.
|
|
20
|
+
- Escape and backdrop closing.
|
|
21
|
+
|
|
22
|
+
## Recommended configuration
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<ngx-drawer-menu
|
|
26
|
+
side="start"
|
|
27
|
+
mode="push"
|
|
28
|
+
effect="fabric"
|
|
29
|
+
[width]="300"
|
|
30
|
+
[openOnDesktop]="true"
|
|
31
|
+
[openOnMobile]="false"
|
|
32
|
+
[mobileBreakpoint]="960"
|
|
33
|
+
[(open)]="drawerOpen"
|
|
34
|
+
[(pinned)]="drawerPinned">
|
|
35
|
+
<router-outlet />
|
|
36
|
+
|
|
37
|
+
<div drawerContent>
|
|
38
|
+
<!-- navigation -->
|
|
39
|
+
</div>
|
|
40
|
+
</ngx-drawer-menu>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Behavior model
|
|
44
|
+
|
|
45
|
+
The drawer owns one continuous `progress` value between `0` and `1`.
|
|
46
|
+
|
|
47
|
+
- `0`: fully closed.
|
|
48
|
+
- `1`: fully open.
|
|
49
|
+
- Pointer dragging directly changes progress.
|
|
50
|
+
- On release, velocity and the configured threshold decide the final state.
|
|
51
|
+
|
|
52
|
+
This is the key to getting a physical-feeling drawer instead of a drawer that simply jumps between CSS classes.
|
|
53
|
+
|
|
54
|
+
## Inputs
|
|
55
|
+
|
|
56
|
+
| Input | Default | Purpose |
|
|
57
|
+
| ------------------- | --------- | ------------------------------------------------------------ |
|
|
58
|
+
| `side` | `start` | Logical drawer side. |
|
|
59
|
+
| `mode` | `overlay` | `overlay`, `push`, or `reveal`. |
|
|
60
|
+
| `effect` | `fabric` | `slide`, `spring`, `fabric`, `curtain`, `elastic`, `reveal`. |
|
|
61
|
+
| `width` | `300` | Drawer width in px. |
|
|
62
|
+
| `maxWidth` | `420` | Safety cap for drawer width. |
|
|
63
|
+
| `edgeSize` | `34` | Edge swipe activation area. |
|
|
64
|
+
| `swipeEnabled` | `true` | Enables gesture interaction. |
|
|
65
|
+
| `backdropClose` | `true` | Close on backdrop press. |
|
|
66
|
+
| `escapeClose` | `true` | Close on Escape. |
|
|
67
|
+
| `open` | `true` | Two-way state via `[(open)]`. |
|
|
68
|
+
| `pinned` | `false` | Persistent drawer state via `[(pinned)]`. |
|
|
69
|
+
| `mobileBreakpoint` | `768` | Mobile breakpoint. |
|
|
70
|
+
| `openOnDesktop` | `true` | State on desktop. |
|
|
71
|
+
| `openOnMobile` | `false` | State on mobile/tablet. |
|
|
72
|
+
| `respondToViewport` | `true` | Enables live responsive switching. |
|
|
73
|
+
| `transitionMs` | `420` | Settle animation duration. |
|
|
74
|
+
|
|
75
|
+
## Responsive behavior
|
|
76
|
+
|
|
77
|
+
By default:
|
|
78
|
+
|
|
79
|
+
- Desktop >= 768px: open.
|
|
80
|
+
- Mobile < 768px: closed.
|
|
81
|
+
- Crossing the breakpoint updates the drawer live.
|
|
82
|
+
- A pinned drawer is not closed by responsive rules.
|
|
83
|
+
|
|
84
|
+
A full `responsive` object is also available when a single config object is preferable:
|
|
85
|
+
|
|
86
|
+
```html
|
|
87
|
+
<ngx-drawer-menu
|
|
88
|
+
[responsive]="{
|
|
89
|
+
mode: 'auto',
|
|
90
|
+
breakpoint: 960,
|
|
91
|
+
desktopOpen: true,
|
|
92
|
+
mobileOpen: false,
|
|
93
|
+
respectPinned: true
|
|
94
|
+
}"></ngx-drawer-menu>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Recommended responsive behavior
|
|
98
|
+
|
|
99
|
+
When `respondToViewport` is enabled, the drawer uses a real sidebar on desktop and an overlay drawer on mobile by default:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<ngx-drawer-menu
|
|
103
|
+
side="start"
|
|
104
|
+
[responsive]="{
|
|
105
|
+
mode: 'auto',
|
|
106
|
+
breakpoint: 960,
|
|
107
|
+
desktopOpen: true,
|
|
108
|
+
mobileOpen: false,
|
|
109
|
+
desktopBehavior: 'dock',
|
|
110
|
+
mobileBehavior: 'overlay',
|
|
111
|
+
respectPinned: true
|
|
112
|
+
}"
|
|
113
|
+
effect="fabric"
|
|
114
|
+
[width]="300">
|
|
115
|
+
<router-outlet />
|
|
116
|
+
<nav drawerContent>...</nav>
|
|
117
|
+
</ngx-drawer-menu>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
In this setup:
|
|
121
|
+
|
|
122
|
+
- `>= 960px`: the open drawer is a real docked sidebar; it owns layout width and does not create a backdrop.
|
|
123
|
+
- `< 960px`: the drawer is an overlay; the page is dimmed and clicking the backdrop can close it.
|
|
124
|
+
- On desktop the drawer can still be dragged closed from its full-height edge handle.
|
|
125
|
+
- When closed, the screen edge remains a mouse/touch drag target and opens the drawer.
|