Is there a way to center the text of the snackbar?
See original GitHub issueHi there, I am trying to replicate this snackbar:
but setting text-align or justify-content doesn’t do the work.
I also tried adding a Text
tag as children but the result doesn’t change.
Is there a way to achieve this?
This is the code for my snackbar and styles:
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Android Snackbar TextAlignment in Center - Stack Overflow
Try following code it's work for set snackbar text in center: Snackbar snackbar = Snackbar.make(main_layout, "This is snack", Snackbar.
Read more >align center mdl-snackbar - CodePen
Adding Classes. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template....
Read more >Center Text On Snack Bar - StackBlitz
Editor Preview Both. Sign in. Project. Search. Settings. Switch to Light Theme. Enter Zen Mode. Project. Download Project. Info. Center Text On Snack...
Read more >How To Create a Snackbar / Toast - W3Schools
Click on the button to show the snackbar. It will disappear after 3 seconds. Show Snackbar. Some text some message.. Create a Snackbar....
Read more >React Snackbar component - Material UI - MUI
In wide layouts, snackbars can be left-aligned or center-aligned if they are consistently placed on the same spot at the bottom of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @SantyLorenzo, you can do that by passing
Text
component withstyle: {{textAlign: 'center'}}
as a children intoSnackbar
. Please look at the snack example.Didn’t work on android