Questions tagged [material-components]

Modular and customizable Material Design UI components. For platform-specific questions, add [ios], [web], or [android].

Material Components help developers implement the Material Design guidelines across Android, iOS, and the web. Developed by a core team of Google engineers and UX designers, these components support the reliable development of beautiful and functional apps.

Material Components for the web is the successor to Material Design Lite, and has 3 high-level goals:

  • Production-ready components consumable in an a-la-carte fashion
  • Best-in-class performance and adherence to the Material Design guidelines
  • Seamless integration with other JS frameworks and libraries

Resources :

567 questions
22
votes
6 answers

Error inflating class com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton

Although there is a similar question, it does not give me a solution. When I'm trying to use com.google.android.material.floatingactionbutton.FloatingActionButton it runs well. But if I try to use…
21
votes
1 answer

How to use data attributes with Material UI?

I recently started using Material Design React, but I have just come across that data-someField does propagate the value to the dataset map. Example: onChange = e =>{ const role…
Antuan
  • 501
  • 2
  • 6
  • 18
20
votes
3 answers

Set border color for a chip in Android

In my android app I have a simple chip that looks like this. Is there any way to set the color of the border to make it like this? UPDATE: I tried to do add the shape but there's an exception during inflating the layout …
20
votes
7 answers

How to programmatically select BottomNavigationBar Tab in Flutter instead of built in onTap callback?

I have been working with BottomNavigationBar in the flutter, but I am not able to select a Tab programmatically outside of onTap callback of BottomNavigationBar. The code with onTap callback, which is working: return new BottomNavigationBar( …
Harsh Sharma
  • 898
  • 1
  • 14
  • 30
20
votes
2 answers

TextInputLayout suffix/prefix

I want to add suffix to TextInputLayout. An example is taken from the material.io Are there any standard solutions?
17
votes
2 answers

BottomNavigationView inside a BottomAppBar with transparent background

I have been combining the new(ish) Material BottomAppBar with a standard BottomNavigationView. My xml is like this:
17
votes
2 answers

OutlinedBox TextInputLayout and gravity center?

How to achieve centered new OutlinedBox style with TextInputLayout? Current behavior:
16
votes
2 answers

How to change the shape of Chips component in android?

When I added ChipGroup and Chips to XML, first it gave me rendering issue which caused activity crash. I solved it by changing the support library version in the gradle.app from implementation 'com.google.android.material:material:1.2.0-alpha05' to…
16
votes
2 answers

Smooth animation between tabs when using selector - Android

I would like to get the background of the tab animated smoothly to the selected position (just like the default tabIndicator animates between tabs). Here is how my TabLayout looks like
16
votes
5 answers

Dynamically create Choice Chip in android

I am using Material Components for creating the Choice chip. I have followed https://material.io/develop/android/components/chip/ document. There is enough stuff for creating a chip in XML but not get an idea of how to create choice chip…
15
votes
2 answers

How to change MaterialAlertDialog text color properly?

I try to use widgets from Material Components only, but in many cases, it's not documented how styling can be achieved. Let's consider MaterialAlertDialog. Each time I want to show a dialog, I call such part of the…
15
votes
5 answers

How to change toolbar text color from MaterialComponents.DayNight theme?

I am using MaterialComponents.DayNight theme in my app. In the day mode, toolbar text color is black. But when I switch to night mode toolbar text color is remain black, so it's not visible anymore.