Question / Feature request
String array can be used to display text on Snackbar in multiline
Single string is displaying in a single line in Snackbar
Multiline text in Snackbar
Snackbars support passing in custom components instead of just strings: https://material.angular.io/components/snack-bar/examples
You can template that component however you wish
What @willshowell said
You could also use the stock component, pass a message with newlines, and set a custom panelClass option that applies white-space: pre-wrap or similar. I tested this and it works for me.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
You could also use the stock component, pass a message with newlines, and set a custom
panelClassoption that applieswhite-space: pre-wrapor similar. I tested this and it works for me.