--- 
title: Notifications
description: Inline message banners (info, success, warning, error)
category: components
alias: message banner, toast, snackbar, alert, info, error, warning, success, notification, message
a1Full: true
group: Data Display

module: NxMessageModule
components:
  - name: NxMessageComponent
    selector: nx-message
    inputs:
      - name: contained
        desc: "Whether the message is rendered inside a filled, bordered surface (`true`, default) or as plain icon and text (`false`)."
        default: input(true, { transform: booleanAttribute })
        type: "InputSignalWithTransform<boolean, unknown>"
  - name: NxMessageToastComponent
    selector: nx-message-toast
    desc: |
      Internal component that wraps user-provided message toast content.
    methods:
      - name: attachComponentPortal
        params:
          - name: portal
            type: ComponentPortal<T>
        desc: "Attach a component portal as content to this message toast container."
        returnType: ComponentRef<T>
      - name: attachTemplatePortal
        params:
          - name: portal
            type: TemplatePortal<C>
        desc: "Attach a template portal as content to this message toast container."
        returnType: EmbeddedViewRef<C>
      - name: enter
        params: 
        desc: "Begin animation of message toast entrance into view."
        returnType: void
      - name: exit
        params: 
        desc: "Begin animation of the message toast exiting from view."
        returnType: void
  - name: NxMessageBannerComponent
    selector: nx-message-banner
    inputs:
      - name: actionLayout
        desc: "Where the projected actions sit: `'horizontal'` puts them on the same line as the content, next to the close button, `'vertical'` on their own line below it.  Default: `'horizontal'`."
        default: input<BANNER_ACTION_LAYOUT>('horizontal')
        type: "InputSignal<'horizontal' | 'vertical'>"
      - name: context
        desc: "Sets the context of the message banner. The message box will color accordingly.  Default: `'info'`."
        type: "'info' | 'critical' | 'positive' | 'warning' | 'error' | 'success'"
  - name: NxMessageBannerActions
    selector: [nxMessageBannerActions]
    desc: |
      Container for the action buttons of a message banner.

---