{"id":18160712,"url":"https://github.com/blankeos/spring-solid","last_synced_at":"2026-02-08T21:32:16.697Z","repository":{"id":241908239,"uuid":"808229134","full_name":"Blankeos/spring-solid","owner":"Blankeos","description":"💙 createSpring primitive for SolidJS","archived":false,"fork":false,"pushed_at":"2024-05-30T17:36:17.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T02:55:16.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blankeos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-30T16:32:03.000Z","updated_at":"2024-11-27T08:51:20.000Z","dependencies_parsed_at":"2024-05-30T17:41:40.652Z","dependency_job_id":"1351cf8e-3046-4f43-985f-381701ce1345","html_url":"https://github.com/Blankeos/spring-solid","commit_stats":null,"previous_names":["blankeos/spring-solid"],"tags_count":1,"template":false,"template_full_name":"solidjs-community/solid-lib-starter","purl":"pkg:github/Blankeos/spring-solid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fspring-solid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fspring-solid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fspring-solid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fspring-solid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blankeos","download_url":"https://codeload.github.com/Blankeos/spring-solid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blankeos%2Fspring-solid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006456,"owners_count":26084108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-02T08:09:06.065Z","updated_at":"2025-10-11T06:31:36.390Z","avatar_url":"https://github.com/Blankeos.png","language":"TypeScript","readme":"\u003cp\u003e\n  \u003cimg width=\"100%\" src=\"https://assets.solidjs.com/banner?type=Primitives\u0026background=tiles\u0026project=spring\" alt=\"Solid Primitives spring\"\u003e\n\u003c/p\u003e\n\n# spring-solid\n\nhttps://github.com/solidjs-community/solid-primitives/assets/38070918/7c4fa01f-7959-4a67-9588-e28448f7f20d\n\n[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge\u0026logo=turborepo)](https://turborepo.org/)\n[![size](https://img.shields.io/bundlephobia/minzip/spring-solid?style=for-the-badge\u0026label=size)](https://bundlephobia.com/package/spring-solid)\n[![version](https://img.shields.io/npm/v/spring-solid?style=for-the-badge)](https://www.npmjs.com/package/spring-solid)\n[![stage](https://img.shields.io/endpoint?style=for-the-badge\u0026url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)\n\nA small SolidJS hook to interpolate signal changes with spring physics. Inspired by \u0026 directly forked from [`svelte-motion/spring`](https://svelte.dev/docs/svelte-motion#spring) as such, has a very familiar API design.\n\nWith this primitive, you can easily animate values that can be interpolated like `number`, `date`, and collections (arrays or nested objects) of those datatypes.\n\n- `createSpring` - Provides a getter and setter for the spring primitive.\n- `createDerivedSpring` - Provides only a getter for the spring primitive deriving from an accessor parameter. Similar to the [@solid-primitives/tween](https://github.com/solidjs-community/solid-primitives/tree/main/packages/tween) API.\n\nThe following physics options are available:\n\n- `stiffness` (number, default `0.15`) — a value between 0 and 1 where higher means a 'tighter' spring\n- `damping` (number, default `0.8`) — a value between 0 and 1 where lower means a 'springier' spring\n- `precision` (number, default `0.01`) — determines the threshold at which the spring is considered to have 'settled', where lower means more precise\n\n## Installation\n\n```bash\nnpm install spring-solid\n# or\nyarn add spring-solid\n# or\npnpm add spring-solid\n# or\nbun add spring-solid\n```\n\n## Quick Start\n\n```ts\n// Basic Example\nconst [progress, setProgress] = createSpring(0);\n\n// Example with options (less sudden movement)\nconst [radialProgress, setRadialProgress] = createSpring(0, { stiffness: 0.05 });\n\n// Example with collections (e.g. Object or Array).\nconst [xy, setXY] = createSpring(\n  { x: 50, y: 50 },\n  { stiffness: 0.08, damping: 0.2, precision: 0.01 },\n);\n\n// Example deriving from an existing signal.\nconst [myNumber, myNumber] = createSignal(20);\nconst springedValue = createDerivedSpring(myNumber, { stiffness: 0.03 });\n```\n\n## Demo\n\n- [CodeSandbox - Basic Example](https://codesandbox.io/p/devbox/ecstatic-borg-k2wqfr)\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md)\n\n\u003e [!NOTE]\n\u003e Since [my PR for solid-primitives](github.com/solidjs-community/solid-primitives/pull/629) might not get reviewed, I'm self-releasing this port on my own. Ideally this would become `@solid-primitives/spring`. Hope you like it anyway!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankeos%2Fspring-solid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblankeos%2Fspring-solid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankeos%2Fspring-solid/lists"}