Version 3.7.1
September 14, 2025
- Updated htmx to version 2.0.7 (changelog).
- Improved the check for Twig globals.
Version 3.6.1
April 16, 2025
- Access to the Sprig Playground is now blocked entirely when the config setting is disabled.
Version 3.6.0
April 9, 2025
- Updated htmx to version 2.0.4 (changelog).
- The Sprig Playground component template is now rendered in a sandboxed context.
- Fixed an information disclosure vulnerability.
- Fixed an XSS vulnerability.
Version 3.5.2
January 19, 2025
Fixed
- Fixed a bug in which
s-actionattributes were being inherited by descendent elements (#408).
Version 3.5.1
October 23, 2024
Changed
- Updated htmx to version 2.0.3 (changelog).
- The fetch function is now called inside an event listener when calling
sprig.triggerRefreshOnLoad(), making it more robust. - Reverted some variable method name changes to improve autocompletion in PhpStorm.
Version 3.5.0
August 29, 2024
Added
- Added the ability to assign an ID to a component by passing a string as the third argument to the
sprig()function.
Changed
- Updated htmx to version 2.0.2 (changelog).
Fixed
- Fixed the positioning of the JavaScript output by the
sprig.triggerRefreshOnLoadfunction.
Deprecated
- Deprecated
sprig.getIsBoosted,sprig.getIsError,sprig.getIsHistoryRestoreRequest,sprig.getIsInclude,sprig.getIsRequest,sprig.getIsSuccess. Usesprig.isBoosted,sprig.isError,sprig.isHistoryRestoreRequest,sprig.isInclude,sprig.isRequest,sprig.isSuccessinstead.
Version 3.4.0
August 20, 2024
Changed
- The
sprig.registerJs(js)function now executes the registered JavaScript after htmx settles, and is now the recommended way of outputting JavaScript in Sprig components. - Components no longer render markup added via
{% html %},{% css %}and{% js %}tags during Sprig requests.
Version 3.3.0
August 8, 2024
Added
- Added the component configurations to a
Sprigvariable in the browser console whendevModeis enabled. - Added the ability to pass any value into
s-method, including theput,patchanddeleteverbs. - Added the
sprig.registerJs(js)function.
Changed
- The
sprig.triggerRefresh(selector, variables)function now prevents cyclical requests.
Version 3.2.1
August 6, 2024
Changed
- The
sprig.swapOob()function now accepts a string, in addition to a template to be rendered, in the second argument.
Version 3.2.0
August 1, 2024
Added
- Added the
sprig.swapOob(selector, template, variables)function that swaps a template out-of-band. - Added the
sprig.triggerRefresh(selector, variables)function that triggers a refresh on a Sprig component.
Changed
- Components now render markup added via
{% html %},{% css %}and{% js %}tags. - The
sprig.triggerRefreshOnLoad(selector)function now appends output to the end of the body and should be called using{% do sprig.triggerRefreshOnLoad(selector) %}.
Version 3.1.0
July 15, 2024
This update introduces htmx 2. Read about the changes →
Added
- Added the s-inherit attribute that allows you to control and enable automatic attribute inheritance for child nodes, if it has been disabled by default.
Changed
- Updated htmx to version 2.0.1 (2.0.0 release notes).
- The htmx file is now output even when Sprig components are used inside of
{% cache %}tags (#329).
Fixed
- Fixed the check for whether
devModeis enabled in the Sprig playground.
Removed
- Removed the
s-sseands-wsattributes.
Version 3.0.1
April 21, 2024
Fixed
- Fixed a bug in which some
sprigvariables were incorrectly persisting across requests (#363).
Version 3.0.0
April 8, 2024
Template caches and static page caches should be cleared after performing this update.
Added
- Added compatibility with Craft 5.
Changed
- Changed how the component configuration is encoded.
Removed
- Removed the
sprig.scriptvariable. - Removed the
s-onattribute. - Removed the
successvariable. Usesprig.isSuccessorsprig.isErrorinstead. - Removed the
flashesvariable. Usesprig.messageinstead. - Removed the
idvariable. Usesprig.modelIdinstead.