material-tailwind icon indicating copy to clipboard operation
material-tailwind copied to clipboard

How to open long model with a vertical scrollbar

Open alexazarh opened this issue 2 years ago • 2 comments

Is there a way to use the dialog component to create a long modal that will get a vertical scrollbar on the browser window?

https://www.material-tailwind.com/docs/react/dialog#long-dialog image

alexazarh avatar Sep 15 '23 02:09 alexazarh

Can anyone from the material-tailwind team respond to this issue?

alexazarh avatar Sep 27 '23 02:09 alexazarh

@alexazarh use ThemeProvider with custom settings, in your case you need to update dialog settings in the next way:

dialog: {
    styles: {
      base: {
        backdrop: {
          position: 'fixed overscroll-y-auto overflow-auto',
        },
      },
    },
  },

full example: https://github.com/oleksandr-andrushchenko/ExamMeFront/blob/main/src/components/ThemeProvider.tsx if it helps - give a star to my repo, thank you

oleksandr-andrushchenko avatar Mar 12 '24 22:03 oleksandr-andrushchenko