2.2.4 • Published 21 days ago

@dreamworld/dw-surface v2.2.4

Weekly downloads
73
License
ISC
Repository
github
Last release
21 days ago

dw-surface

Usage

There are 2 different ways to use it:

  1. Extend DWSurface and specify _contentTemplate(). (Most used case)
  2. Use dw-surface in local dom of any other element & provide it's content as light dom (slot). (Rare used case)

properties

NameTypeDefaultDescription
bgStringsurfaceIn which color background should be rendered. Possible values: primary, secondary, error and surface.
elevationNumber0Drop-shadow changes based on this. In the dark-theme, the opacity of the background is changed on different elevations. Those can be configured through custom CSS properties.
transparentBooleanfalseFor a transparent background, set true elevation to 0.
interactiveBooleanfalseSet true to enable hover, focus and ripple effects.
selectedBooleanfalseSet to true to show the surface selected.
activatedBooleanfalseSet to true to display the surface in an activated state. 

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.

2.2.4

21 days ago

2.2.3

22 days ago

2.2.2

2 months ago

2.2.1

2 months ago

2.2.0

1 year ago

2.0.1

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

1.9.0

2 years ago

1.8.0

2 years ago

2.0.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.1

3 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago