API
API
The stylesheet holds the shadow and card classes. The module exports createFadeEdge and the level names.
| Name | Description |
|---|---|
reuse-shadow-xs … reuse-shadow-2xl | Six shadow levels. |
reuse-shadow-ring-xs … reuse-shadow-ring-2xl | The same levels with a hairline ring instead of a border. |
reuse-card, reuse-card-frame | A card surface and its outer frame. |
reuse-card-code, reuse-card-action | Cards for code samples and for actions. |
shadowLevels | The level names in order, from "xs" to "2xl". |
createFadeEdge(scroller, { size, curve, mode }) | Masks the edges of a horizontal scroller. Returns update(options) and destroy(). |
size | The width of each fade in pixels. 64 by default. |
curve, FADE_CURVES | "smooth" eases the fade in and out, "linear" is a straight ramp. "smooth" by default. |
mode, FADE_MODES | "scroll" grows each fade with the distance left to scroll. "fixed" keeps it at full size until that edge is reached. "scroll" by default. |