
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sitch-embed
Advanced tools
This package lets you use embedded Sitches on your website. Sitches are functionality focused web pages that you can build on https://mysitch.app. You can learn more about what they're for at https://sitch.cards.
The blog, store, and contact form on https://sitch.cards are all embedded Sitches.
yarn add sitch-embed
or
npm add sitch-embed
or if you're not using a package manager
<script src="https://storage.googleapis.com/sitch-public/sitch-embed.js"></script>
So first you need to specify which buttons load a Sitch. You do this by adding the "sitch-activation-button" class to each relevant button. Then for each button you need to specify which Sitch it loads. You do this by adding the following data attribute.
Every Sitch has a unique link. You can get this link by selecting the Sitch on https://mysitch.app and pressing "Copy Link", or by editing the Sitch and viewing it at the top of the edit page. As an example, for Sitch link https://sitch.app/s/i4lVvZB, you would add data-sitch-link="https://sitch.app/s/i4lVvZB" to a button.
There's two more attributes you can use to customize things:
Use this to determine how far in the embedded Sitch will slide in from the right when activated. The value is in pixels. An example would be data-sitch-max-width="500" to make the Sitch slide in from the right and stop at 500px in.
To make the Sitches behave like proper webpages on your site you can add this data attribute to give them a hash addresses. For example, a Sitch button on https://sitch.cards has data-sitch-hash="store" on it, so if you visit https://sitch.cards/#store the store opens right away . Make sure any hash addresses you use are unique and aren't used as HTML "id" values on any elements on your page.
Finally to activate the buttons you would import the library:
import initializeSitchButtons from 'sitch-embed';
And call the imported function.
initializeSitchButtons();
If you're not using a package manager you would just call initializeSitchButtons(); once the script has loaded.
initializeSitchButtons takes single argument for an options object.
You can provide a z-index for the embedded Sitches. So to make the Sitches use z-index 1000 you would write initializeSitchButtons({baseZIndex: 1000}).
A background color to show before the Sitch's theme is initialized and rendered. This is really only relevant if a Sitch is being shown on page load using data-sitch-hash or if the user opens a Sitch very very quickly after page load. You would want this color to match your theme background to make the color shift less jarring. Example: initializeSitchButtons({backgroundColor: '#000'}).
The function provided here will execute when a Sitch acivation button is clicked. An object of following structure is passed as an argument: { hash: string; url: string }.
Example:
onSitchActivationCallback: ({ hash, url }) => {
if (hash === '#store' || url === 'sitch.app/store') {
console.log('Someone viewed the store.')
}
},
The function provided here will execute when an item is added to the cart of a Shop Sitch. An object of following structure is passed as an argument: { amount: string; currency: string }. The amount is always an integer. For example, in USD an amount of 1 is 1 cent, and 100 is a dollar.
Example:
onAddToCartCallback: ({ amount, currency }) => {
console.log(`Reporting add to cart of amount ${amount} in ${currency}.`)
},
The function provided here will execute when a payment is made either to a Shop Sitch or a Business Payment Sitch. An object of following structure is passed as an argument: { amount: string; currency: string }. The amount is always an integer. For example, in USD an amount of 1 is 1 cent, and 100 is a dollar.
Example:
onPaymentCallback: ({ amount, currency }) => {
console.log(`Reporting payment of amount ${amount} in ${currency}.`)
},
initializeSitchButtons() must be called after the Sitch buttons are mounted in the DOM. If your DOM dynamically changes you'll have to re-execute the function any time new Sitch buttons are constructed.
FAQs
For embedding Sitches made on mysitch.app into websites.
The npm package sitch-embed receives a total of 0 weekly downloads. As such, sitch-embed popularity was classified as not popular.
We found that sitch-embed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.