A notification provides contextual feedback or information related to user actions within a page's content.
import { DaffNotificationComponent } from '@daffodil/design/notification'
Notifications provide contextual feedback or information related to user actions within a page's content.
Use Toast for app-level alerts.
@Component()
class DaffNotificationComponent {
@Input() status: DaffStatus
@Input() dismissible: boolean = false
@Input() orientation: DaffCardOrientation = 'vertical'
@Output() closeNotification: EventEmitter<void> = new EventEmitter()
}
DaffStatus
Default | – |
---|---|
Description | Sets the status on a component. Options are: |
boolean
Default | false |
---|---|
Description | Whether the notification can be dismissed by the user.
Displays a close icon if |
DaffCardOrientation
Default | 'vertical' |
---|---|
Description | The orientation of a notification. |
EventEmitter
Default | – |
---|---|
Description | Emits when the notification is closed. |
import { DaffNotificationActionsDirective } from '@daffodil/design/notification'
Actions is used to include actionable buttons related to the notification (e.g., dismiss, navigate).
@Directive()
class DaffNotificationActionsDirective {}
import { DaffNotificationTitleDirective } from '@daffodil/design/notification'
Title is the primary text summarizing the notification.
@Directive()
class DaffNotificationTitleDirective {}
import { DaffNotificationSubtitleDirective } from '@daffodil/design/notification'
@Directive()
class DaffNotificationSubtitleDirective {}
import { DaffNotificationMessageDirective } from '@daffodil/design/notification'
Message provides additional details or supporting context that supplements the notification title. Keep this brief—ideally one to two short sentences.
@Directive()
class DaffNotificationMessageDirective {}
import { DaffNotificationModule } from '@daffodil/design/notification'
@NgModule()
class DaffNotificationModule {}
import { DaffNotificationOrientation } from '@daffodil/design/notification'
The available orientations for a notification.
Orientation | Description |
---|---|
vertical |
Stacks notification content from top to bottom. This is the default orientation. |
horizontal |
Places notification content side-by-side. |
type DaffNotificationOrientation = 'horizontal' | 'vertical'
import { DaffNotificationOrientationEnum } from '@daffodil/design/notification'
Enum for representing the available notification orientations.
See DaffNotificationOrientation
for descriptions of each orientation.
enum DaffNotificationOrientationEnum {
Horizontal = DaffNotificationOrientationEnum.Horizontal,
Vertical = DaffNotificationOrientationEnum.Vertical,
}