API

API

The stylesheet holds the shadow and card classes. The module exports createFadeEdge and the level names.

NameDescription
reuse-shadow-xs … reuse-shadow-2xlSix shadow levels.
reuse-shadow-ring-xs … reuse-shadow-ring-2xlThe same levels with a hairline ring instead of a border.
reuse-card, reuse-card-frameA card surface and its outer frame.
reuse-card-code, reuse-card-actionCards for code samples and for actions.
shadowLevelsThe 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().
sizeThe 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.