# message

```ts
import { MessageModule } from '@anguless/angulux/message';
```

## Message

`agl-message` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

Message groups a collection of contents in tabs.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `severity` | `'success' \| 'info' \| 'warn' \| 'error' \| 'secondary' \| 'contrast' \| undefined \| null` | `'info'` | Severity level of the message. |
| `text` | `string \| undefined` | _not documented_ | Text content. **Deprecated:** since v20.0.0. Use content projection instead '<agl-message>Content</agl-message>'. |
| `escape` | `boolean` | _not documented_ | Whether displaying messages would be escaped or not. **Deprecated:** since v20.0.0. Use content projection instead '<agl-message>Content</agl-message>'. |
| `style` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Inline style of the component. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the component. |
| `closable` | `boolean` | `false` | Whether the message can be closed manually using the close icon. |
| `icon` | `string \| undefined` | `undefined` | Icon to display in the message. |
| `closeIcon` | `string \| undefined` | `undefined` | Icon to display in the message close button. |
| `life` | `number \| undefined` | `undefined` | Delay in milliseconds to close the message automatically. |
| `showTransitionOptions` | `string` | `'300ms ease-out'` | Transition options of the show animation. **Deprecated:** since v21.0.0, use `motionOptions` instead. |
| `hideTransitionOptions` | `string` | `'200ms cubic-bezier(0.86, 0, 0.07, 1)'` | Transition options of the hide animation. **Deprecated:** since v21.0.0, use `motionOptions` instead. |
| `size` | `'large' \| 'small' \| undefined` | _not documented_ | Defines the size of the component. |
| `variant` | `'outlined' \| 'text' \| 'simple' \| undefined` | _not documented_ | Specifies the input variant of the component. |
| `motionOptions` | `MotionOptions \| undefined` | _not documented_ | The motion options. |

| Output | Type | Description |
| --- | --- | --- |
| `onClose` | `EventEmitter<{ originalEvent: Event }>` | Emits when the message is closed. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #container>` | `containerTemplate` | Custom template of the message container. |
| `<ng-template #icon>` | `iconTemplate` | Custom template of the message icon. |
| `<ng-template #closeicon>` | `closeIconTemplate` | Custom template of the close icon. |
