There are 2 different ways to use it:
- Extend
DWSurfaceand specify_contentTemplate(). (Most used case) - Use
dw-surfacein local dom of any other element & provide it's content as light dom (slot). (Rare used case)
bg. In which color background should be rendered. Possible values:primary,secondary,errorandsurface. Default value issurface.elevation(Number). Default value0. drop-shadow changes based on this. In dark-theme opacity of the background is changed on different elevation. Those can be configured through custom css properties.
--dw-surface-overlay-color--dw-surface-overlay-opacitiy-elevation-1--dw-surface-overlay-opacitiy-elevation-2--dw-surface-overlay-opacitiy-elevation-3--dw-surface-overlay-opacitiy-elevation-4--dw-surface-overlay-opacitiy-elevation-6--dw-surface-overlay-opacitiy-elevation-8--dw-surface-overlay-opacitiy-elevation-12--dw-surface-overlay-opacitiy-elevation-16--dw-surface-overlay-opacitiy-elevation-24
It's already been declrared with default values of material style in
material-styles. So, In most cases you don't need to customize them unless you really intended to do so.