Material-ui: Dialogs: missing backdrop css API

Created on 15 May 2018  路  3Comments  路  Source: mui-org/material-ui

I can't find a way to customize the css of a backdrop/overlay of a dialog.

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

| Tech | Version |
|--------------|---------|
| Material-UI | v1.0.0-rc.0 |

Dialog question

Most helpful comment

      <Dialog
        BackdropProps={{
          className: classes.backdrop
        }}

capture d ecran 2018-05-15 a 21 28 59

https://codesandbox.io/s/03mj318xm0

All 3 comments

      <Dialog
        BackdropProps={{
          className: classes.backdrop
        }}

capture d ecran 2018-05-15 a 21 28 59

https://codesandbox.io/s/03mj318xm0

@nicgirault The trick is to follow the properties inheritance / cascading between the components.
Dialog > Modal

But classes api allows to handle it in less noisy way

const UDialog = withStyles({
  backgrop: {
    background: '#000'
  }
})(Dialog)
Was this page helpful?
0 / 5 - 0 ratings