createDrawer

constant

const createDrawer: WidgetFactory<DrawerWidget>

Create a Drawer with given config props

Param

an optional Drawer config

Returns

a DrawerWidget


DrawerApi

interface

Interface representing the API for a Drawer component.

Properties
close

close: () => void

Trigger the closing of the drawer.

Returns

void


open

open: () => void

Trigger the opening of the drawer.

Returns

void


DrawerBodyDirective

class

Directive to represent the body of a drawer notification. This directive uses a template reference to render the DrawerContext.


DrawerComponent

class

DrawerComponent is an Angular component that extends the BaseWidgetDirective to provide a customizable drawer widget. This component allows for various configurations and customizations through its inputs and outputs.

Properties
animated

readonly animated: InputSignalWithTransform<boolean | undefined, unknown>

If true opening and closing will be animated.

Default Value

true


ariaDescribedBy

readonly ariaDescribedBy: InputSignal<string | undefined>

aria-describedby attribute to use for the drawer element.

Default Value

''


ariaLabelledBy

readonly ariaLabelledBy: InputSignal<string | undefined>

aria-labelledby attribute to use for the drawer element.

Default Value

''


backdrop

readonly backdrop: InputSignalWithTransform<boolean | undefined, unknown>

If true displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable

Default Value

true


backdropClass

readonly backdropClass: InputSignal<string | undefined>

Classes to add on the backdrop DOM element.

Default Value

''


backdropTransition

readonly backdropTransition: InputSignal<TransitionFn | undefined>

The transition to use for the backdrop behind the drawer (if present).

Default Value

fadeTransition


bodyScroll

readonly bodyScroll: InputSignalWithTransform<boolean | undefined, unknown>

If true allows body scrolling when the drawer is open.

Default Value

false


children

readonly children: InputSignal<SlotContent<DrawerContext>>

Template for the drawer body


className

readonly className: InputSignal<string | undefined>

CSS classes to be applied on the widget main container

Default Value

'w-full'


container

readonly container: InputSignal<HTMLElement | null | undefined>

Which element should contain the drawer and backdrop DOM elements. If it is not null, the drawer and backdrop DOM elements are moved to the specified container. Otherwise, they stay where the widget is located.

Default Value
typeof window !== 'undefined' ? document.body : null

focusOnInit

readonly focusOnInit: InputSignalWithTransform<boolean | undefined, unknown>

If true focuses the drawer when it is opened.

Default Value

true


header

readonly header: InputSignal<SlotContent<DrawerContext>>

Template for the drawer header


hidden

readonly hidden: OutputEmitterRef<void>

Event to be triggered when the transition is completed and the drawer is not visible.

Default Value
() => {}

maximizedChange

readonly maximizedChange: OutputEmitterRef<boolean>

Event to be triggered when the maximized state changes.

Default Value
() => {}

minimizedChange

readonly minimizedChange: OutputEmitterRef<boolean>

Event to be triggered when the minimized state changes.

Default Value
() => {}

resizable

readonly resizable: InputSignalWithTransform<boolean | undefined, unknown>

If true, the drawer can be resized by the user.

Default Value

false


resizingChange

readonly resizingChange: OutputEmitterRef<boolean>

Event to be triggered when the user starts or stops resizing the drawer.

Default Value
() => {}

shown

readonly shown: OutputEmitterRef<void>

Event to be triggered when the transition is completed and the drawer is visible.

Default Value
() => {}

size

readonly size: InputSignalWithTransform<number | null | undefined, unknown>

Size of the drawer in pixel once the user start interacting. It corresponds to the height or the width depending on the drawer orientation

Default Value

null


sizeChange

readonly sizeChange: OutputEmitterRef<number | null>

An event emitted when the drawer size changes (width or height depending on the orientation).

Event payload is equal to the newly selected width or height.

Default Value
() => {}

structure

readonly structure: InputSignal<SlotContent<DrawerContext>>

Global template for the drawer component


transition

readonly transition: InputSignal<TransitionFn | undefined>

The transition function will be executed when the drawer is displayed or hidden.

Default Value
collapseHorizontalTransition

verticalTransition

readonly verticalTransition: InputSignal<TransitionFn | undefined>

The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.

Default Value
collapseVerticalTransition

visible

readonly visible: InputSignalWithTransform<boolean | undefined, unknown>

If true, the drawer is shown; otherwise, it is hidden.

Default Value

false


visibleChange

readonly visibleChange: OutputEmitterRef<boolean>

Event to be triggered when the visible property changes.

Param

new value of the visible propery

Default Value
() => {}
Accessors
api
Get Signature

get api(): W["api"]

Retrieves the widget api

Returns

W["api"]

the widget api


directives
Get Signature

get directives(): W["directives"]

Retrieves the widget directives

Returns

W["directives"]

the widget directives


state
Get Signature

get state(): AngularState<W>

Retrieves the widget state. Each property of the state is exposed through an Angular Signal

Returns

AngularState<W>

the widget state


DrawerContext

type alias

DrawerContext = WidgetSlotContext<DrawerWidget>

Represents the context for a Drawer widget. This interface is an alias for WidgetSlotContext<DrawerWidget>.


drawerDefaultSlotStructure

constant

const drawerDefaultSlotStructure: SlotContent<DrawerContext>

Represents the default slot structure for the drawer component.


DrawerDirectives

interface

Represents the directives for the Drawer component.

Properties
backdropDirective

backdropDirective: Directive

Directive to put on the backdrop DOM element.


backdropPortalDirective

backdropPortalDirective: Directive

Portal directive to put on the backdrop DOM element.


containerDirective

containerDirective: Directive

Directive to put on the container DOM element in order for the drawer to size correctly.


drawerDirective

drawerDirective: Directive

Directive to put on the drawer DOM element.


drawerPortalDirective

drawerPortalDirective: Directive

Portal directive to put on the drawer DOM element.


splitterDirective

splitterDirective: Directive

Directive to put on the splitter DOM element.


DrawerHeaderDirective

class

Directive representing the header of a drawer component. This directive uses a template reference to render the DrawerContext.


DrawerPositions

type alias

DrawerPositions = "inline-start" | "inline-end" | "block-start" | "block-end"

Possible values for the drawer positions


DrawerProps

interface

Represents the properties for the Drawer component.

Properties
animated

animated: boolean

If true opening and closing will be animated.

Default Value

true


ariaDescribedBy

ariaDescribedBy: string

aria-describedby attribute to use for the drawer element.

Default Value

''


ariaLabelledBy

ariaLabelledBy: string

aria-labelledby attribute to use for the drawer element.

Default Value

''


backdrop

backdrop: boolean

If true displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable

Default Value

true


backdropClass

backdropClass: string

Classes to add on the backdrop DOM element.

Default Value

''


backdropTransition

backdropTransition: TransitionFn

The transition to use for the backdrop behind the drawer (if present).

Default Value

fadeTransition


bodyScroll

bodyScroll: boolean

If true allows body scrolling when the drawer is open.

Default Value

false


children

children: SlotContent<DrawerContext>

Template for the drawer body


className

className: string

CSS classes to be applied on the widget main container

Default Value

'w-full'


container

container: HTMLElement | null

Which element should contain the drawer and backdrop DOM elements. If it is not null, the drawer and backdrop DOM elements are moved to the specified container. Otherwise, they stay where the widget is located.

Default Value
typeof window !== 'undefined' ? document.body : null

focusOnInit

focusOnInit: boolean

If true focuses the drawer when it is opened.

Default Value

true


header

header: SlotContent<DrawerContext>

Template for the drawer header


onHidden

onHidden: () => void

Event to be triggered when the transition is completed and the drawer is not visible.

Returns

void

Default Value
() => {}

onMaximizedChange

onMaximizedChange: (isMaximized) => void

Event to be triggered when the maximized state changes.

Parameters
isMaximized

boolean

Returns

void

Default Value
() => {}

onMinimizedChange

onMinimizedChange: (isMinimized) => void

Event to be triggered when the minimized state changes.

Parameters
isMinimized

boolean

Returns

void

Default Value
() => {}

onResizingChange

onResizingChange: (isResizing) => void

Event to be triggered when the user starts or stops resizing the drawer.

Parameters
isResizing

boolean

Returns

void

Default Value
() => {}

onShown

onShown: () => void

Event to be triggered when the transition is completed and the drawer is visible.

Returns

void

Default Value
() => {}

onSizeChange

onSizeChange: (size) => void

An event emitted when the drawer size changes (width or height depending on the orientation).

Event payload is equal to the newly selected width or height.

Parameters
size

number | null

Returns

void

Default Value
() => {}

onVisibleChange

onVisibleChange: (visible) => void

Event to be triggered when the visible property changes.

Parameters
visible

boolean

new value of the visible propery

Returns

void

Default Value
() => {}

resizable

resizable: boolean

If true, the drawer can be resized by the user.

Default Value

false


size

size: number | null

Size of the drawer in pixel once the user start interacting. It corresponds to the height or the width depending on the drawer orientation

Default Value

null


structure

structure: SlotContent<DrawerContext>

Global template for the drawer component


transition

transition: TransitionFn

The transition function will be executed when the drawer is displayed or hidden.

Default Value
collapseHorizontalTransition

verticalTransition

verticalTransition: TransitionFn

The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.

Default Value
collapseVerticalTransition

visible

visible: boolean

If true, the drawer is shown; otherwise, it is hidden.

Default Value

false


DrawerState

interface

Represents the state of a Drawer component.

Properties
backdropClass

backdropClass: string

Classes to add on the backdrop DOM element.

Default Value

''


backdropHidden

backdropHidden: boolean

Whether the backdrop is fully hidden. This can be true either because backdrop is false or because visible is false and there is no current transition.


children

children: SlotContent<DrawerContext>

Template for the drawer body


className

className: string

CSS classes to be applied on the widget main container

Default Value

'w-full'


container

container: HTMLElement | null

Which element should contain the drawer and backdrop DOM elements. If it is not null, the drawer and backdrop DOM elements are moved to the specified container. Otherwise, they stay where the widget is located.

Default Value
typeof window !== 'undefined' ? document.body : null

header

header: SlotContent<DrawerContext>

Template for the drawer header


hidden

hidden: boolean

Flag to show whether the drawer is fully hidden.


isVertical

isVertical: boolean

Flag to show whether the drawer is vertically positioned.


resizable

resizable: boolean

If true, the drawer can be resized by the user.

Default Value

false


size

size: number | null

Size of the drawer in pixel once the user start interacting. It corresponds to the height or the width depending on the drawer orientation

Default Value

null


structure

structure: SlotContent<DrawerContext>

Global template for the drawer component


visible

visible: boolean

If true, the drawer is shown; otherwise, it is hidden.

Default Value

false


DrawerStructureDirective

class

Directive to define the structure of a drawer component. This directive uses a template reference to render the DrawerContext.


DrawerWidget

type alias

DrawerWidget = Widget<DrawerProps, DrawerState, DrawerApi, DrawerDirectives>

Represents a Drawer widget component.


getDrawerDefaultConfig

constant

const getDrawerDefaultConfig: () => DrawerProps

Retrieve a shallow copy of the default Drawer config

Returns

DrawerProps

the default Drawer config