question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add indefinite snackbar duration

See original GitHub issue

Feature Request

Currently, snackbars time out after a set period of time, which fits with the transient principle in the material design guidelines. The android spec, however, allows the user to display a snackbar for an indefinite amount of time.

I think this feature could be useful to have in the web components. It could still be transient by default, but the user could optionally specify an indefinite length of time. It could be a separate property like:

const snackbar_options = {
    indefinite: true
}

or another value for timeout, like:

const snackbar_options = {
    timeout: null
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

12reactions
montoyaaguirrecommented, Jan 10, 2020

This feature has been implemented. If you’re using angular material and you want to open a snackbar that will stay on screen until the next one is displayed, you can use: snackbar.open(“Message”, “Action”, {duration: undefined});

1reaction
jwgwarrencommented, Jun 19, 2019

This outcome is just irritating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Support Library Snackbar with indefinite length
It is not possible to set an indefinite display of a Snackbar when using the official implementation from the Android Design Support library ......
Read more >
SnackbarDuration - Android Developers
Show the Snackbar indefinitely until explicitly dismissed or action is clicked. Long. Show the Snackbar for a long period of time.
Read more >
ANDROID - SNACK BAR - INDEFINITE DURATION, ANCHOR VIEW ...
ANDROID - SNACK BAR - INDEFINITE DURATION, ANCHOR VIEW, ACTION BUTTON || TUTORIAL IN KOTLIN. 18 views 3 months ago. IT Wala. IT...
Read more >
Snackbars - Material Design
Before you can use Material snackbars, you need to add a dependency to the Material Components for Android library. For more information, go...
Read more >
Implement Android Snackbar in Jetpack Compose
4. Show or hide snackbar · message : text in the snackbar. · actionLabel : action label in the snackbar. · duration :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found