Snackbar

PRO

You can edit 8 Components for free. Get premium for unlimited access.

A snackbar is an ephemeral message used to give users feedback after taking an action.

Figma

The Snackbar component is used to provide direct feedback on an action.

1. Reference

This component inherits props from the Snackbar.

Prop
Type
Default
type
information
error
success
warning
information

2. Type

You can edit the type with the success, warning, information and error parameter.

Image 2.1 : State success

Image 2.2 : State warning

Image 2.3 : State information

Image 2.4 : State error

Jetpack Compose

This component is on the roadmap and in Progress This means that it is currently being edited and will be published in the next few weeks/months. Check back often to stay informed about the latest updates.

🚧

Preview

Saved successfully
DlSnackbar(
  label: 'Saved successfully',
)
Copy

Usage

Add this code example to your project to see how the component works.

DlSnackbar(
  label: 'Something went wrong',
  type: DlSnackbarType.error,
)
Copy

API Reference

DlSnackbar is a hug-width feedback component with fixed surface styling, semantic icon types success , error , warning and information and compact icon-text layout for short status messages.

Prop
Type
Default
label
String
-
type
success
warning
error
information
success
key
Key?
null

Examples

Variants

Label
Label
Label
Label
Wrap(
  spacing: DlSpacingTokens.p_16,
  runSpacing: DlSpacingTokens.p_16,
  children: [
    DlSnackbar(
      label: 'Label',
      type: DlSnackbarType.error,
    ),
    DlSnackbar(
      label: 'Label',
      type: DlSnackbarType.success,
    ),
    DlSnackbar(
      label: 'Label',
      type: DlSnackbarType.warning,
    ),
     DlSnackbar(
      label: 'Label',
      type: DlSnackbarType.information,
    ),
  ],
)
Copy

Discover more content

You have questions or need help?

E-Mail

You want to try?

Test for free

Save time and money?

Get Pro Version