@svelte-put

svelte-put is a collection of useful svelte actions, utilities, and minimal components extracted from (my) real world projects that might be helpful for yours.

Packages

@svelte-put includes several packages with self-manged release cycles, listed below. Check out their corresponding documentation for more details.

IDDesrciptionVersionStatus
async-stacktype-safe and headless builder for async component stack@svelte-put/async-stacknew
avatarcomponent & utilities for building avatars@svelte-put/avatarstable
clickoutsideevent for clicking outside node@svelte-put/clickoutsidestable
cloudflare-turnstileaction for rendering Cloudflare turnstile into HTML node@svelte-put/cloudflare-turnstilenew
copyaction & utilities to copy text to clipboard@svelte-put/copystable
dragscrollaction to add "drag-to-scroll" behavior@svelte-put/dragscrollstable
inline-svgsolution for inlining SVGs in svelte land@svelte-put/inline-svgstable
intersectsvelte action that wraps for IntersectionObserver@svelte-put/intersectstable
lockscrolllocking scroll and hide scrollbar within an HTML element@svelte-put/lockscrollstable
movablemove node on mousedown@svelte-put/movablestable
popoverMinimal and ssr-friendly enhancements to Popover API with idiomatic Svelte@svelte-put/popovernew
preactionallow Svelte action to spread SSR-friendly attriutes@svelte-put/preactionbeta
preprocess-auto-slugsvelte preprocessor to add id attribute and anchor tag@svelte-put/preprocess-auto-slugstable
preprocess-external-linksvelte preprocessor to add appropriate attributes to anchor tags for external links@svelte-put/preprocess-external-linkstable
qrrender QR as img or svg, optionally with logo@svelte-put/qrstable
resizeSvelte action wrapper for ResizeObserver@svelte-put/resizestable
shortcutadd keyboard shortcuts to node@svelte-put/shortcutstable
swipeableset up quick swipe gesture action on element@svelte-put/swipeablenew
tocaction and utilities for building table of contents@svelte-put/tocstable

Inspiration & Acknowledgement

There is already a great pool of svelte actions collected by Shawn and other contributors that you should check out. There might be some duplications here and there. However:

  • Shawn's project aims to be a source for RFCs into Svelte; I believe stuff I am putting here should stay in user land.
  • I prefer having separate packages for their dedicated purposes (instead of one package that exports everything).
  • I want to incrementally include more than just actions int his collection.

For those reasons, a monorepo seems like a good fit, hence this project. To contribute or support the project, head over to the contributing page. Happy coding! 👨‍💻

Edit this page on Github