Skip to content

v - 1.2.0

Choose a tag to compare

@DmitriyBol DmitriyBol released this 07 Aug 15:34
· 24 commits to main since this release
b38d583

The first release since 1.0.1 — it rolls up versions 1.1.0 through 1.2.0.

Added

  • Variable-width slides — slidesPerView="auto" (1.1.0). Each slide keeps its own content width instead of an equal fraction of the viewport (tag rows, chips, hero strips, self-sizing cards). The carousel measures every slide, re-measures when their content resizes, and drives all geometry from those measurements: positions are measured rather than derived (trailing slides sharing the final viewport collapse into one flush position), drag / free / free snap project onto the real boundaries, and the last position rests flush — never blank space. Works with loop, flow, gap, align, axis="y", lazyMount, and breakpoints. Server-side the slides render at their natural width — initialIndex 0 without loop is zero-CLS.
  • Adaptive viewport height — the new lightslide/autoheight entry (1.2.0). Pass autoHeight={<AutoHeight />} and the viewport takes the active slide's measured height, animating every change in step with the snap (same duration and easing) instead of staying as tall as the tallest slide (dead air) or cropping. Slides top-align while engaged; the height re-measures when the active slide's content resizes (an image loads, text expands) and when the viewport reflows, and follows every navigation source — drag, controls, autoplay, the external API, a free-scroll coast settling. prefers-reduced-motion applies each height instantly. Inert while flow runs and on a vertical carousel (axis="y"); unmounting the plugin restores the default tallest-slide box. The entry weighs ~0.7 kB brotli.

Fixed

  • React 19: loop clones stayed reachable by assistive tech (1.1.1). React 19 promoted inert to a real boolean prop and treats the React-18 empty-string form as false — so on React 19 the loop clones silently lost their inert, putting their focusable duplicates back into the tab order. The attribute now follows the running React major: true on 19+, '' on 18. The peer range is unchanged (>=18).

Changed

  • Bundle budgets follow the features honestly. Variable width raised the core 5.5 → 6 kB (1.1.0); a source-level size pass then clawed bytes back and tightened core to 6, lightslide/free to 2, lightslide/flow to 1.85 kB (1.1.2); the autoheight slot's core-side seam costs ~55 B, so the core budget is now 6.05 kB (actual ~6.02, brotli). Bundles that never import lightslide/autoheight pay only the seam; the plugin logic lives entirely in the opt-in entry.
  • Dev-dependency majors landed along the way (Jest 30, React 19 in the unit matrix), and a fresh high advisory in transitive dev dependencies (js-yaml, CVE-2026-59870) was resolved via npm audit fix — 0 known vulnerabilities.

Full details: CHANGELOG.md · Docs: Variable width · Adaptive height · Demo: lightslide.vercel.app