{"id":13431196,"url":"https://github.com/elcontraption/flickity-transformer","last_synced_at":"2025-07-26T16:31:20.960Z","repository":{"id":57238387,"uuid":"67640058","full_name":"elcontraption/flickity-transformer","owner":"elcontraption","description":"Transform your Flickity.","archived":false,"fork":false,"pushed_at":"2022-11-14T13:27:34.000Z","size":707,"stargazers_count":75,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-16T16:23:19.409Z","etag":null,"topics":["flickity"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elcontraption.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-07T20:13:40.000Z","updated_at":"2024-05-22T10:36:08.000Z","dependencies_parsed_at":"2023-01-21T16:16:36.384Z","dependency_job_id":null,"html_url":"https://github.com/elcontraption/flickity-transformer","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/elcontraption/flickity-transformer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcontraption%2Fflickity-transformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcontraption%2Fflickity-transformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcontraption%2Fflickity-transformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcontraption%2Fflickity-transformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elcontraption","download_url":"https://codeload.github.com/elcontraption/flickity-transformer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elcontraption%2Fflickity-transformer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266210928,"owners_count":23893343,"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","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":["flickity"],"created_at":"2024-07-31T02:01:01.251Z","updated_at":"2025-07-26T16:31:20.600Z","avatar_url":"https://github.com/elcontraption.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Flickity Transformer\n\n\n \n\n\n:robot: **I'm no longer supporting this project, please feel free to use my work to make something neat.** :robot:\n\n\nAn interface for declaring granular transform effects for [Flickity](http://flickity.metafizzy.co/).\n\n[![Demo image](demo.gif)](http://codepen.io/elcontraption/full/RGPboR/)\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Transforms](#transforms)\n  - [Default units](#default-units)\n- [Examples](#examples)\n- [Contributing](#contributing)\n\n## Installation\nVia NPM:\n```bash\nyarn add flickity-transformer\n# or\nnpm i --save flickity-transformer\n```\n\nVia download:\n- Minified: [flickity-transformer.pkgd.min.js](https://unpkg.com/flickity-transformer/dist/flickity-transformer.pkgd.min.js)\n- Un-minified: [flickity-transformer.pkgd.js](https://unpkg.com/flickity-transformer/dist/flickity-transformer.pkgd.js)\n\nCDN:\n```html\n\u003c!-- Minified --\u003e\n\u003cscript src=\"https://unpkg.com/flickity-transformer/dist/flickity-transformer.pkgd.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Un-minified --\u003e\n\u003cscript src=\"https://unpkg.com/flickity-transformer/dist/flickity-transformer.pkgd.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\nCreate a new FlickityTransformer, passing in your Flickity instance and an array of [transform objects](#transforms). Transforms will be applied to each Flickity cell in the order they are declared.\n\n```js\nvar Flickity = require('flickity')\nvar FlickityTransformer = require('flickity-transformer')\n\nvar flkty = new Flickity('.carousel', {\n  // options\n})\n\nvar transformer = new FlickityTransformer(flkty, [\n  {\n    name: 'scale', // Let's scale your cells...\n    stops: [\n      [-300, 0.5], // at -300px, slides will be scaled to 0.5\n      [0, 1], // at the home position, slides will be full size\n      [300, 0.5] // at 300px, slides will be half size again\n    ]\n  },\n  {\n    name: 'rotate', // and add a little rotation...\n    unit: 'rad' // use a unit other than the default\n    stops: [\n      [-300, -1], // rotate slides to the left by 1 radian\n      [0, 0], // they'll be straight at center\n      [300, 1] // and rotated to the right\n      // Add as many stops as you need\n    ]\n  }\n])\n```\n\n### Transforms\nEach object in the transforms array requires at least two properties: `name` and `stops`. Each stop in `stops` is an array with two values: x position in pixels relative to the home position of your carousel, and the transform value to apply at that position.\n\n| property      | type      | value             |\n| ------------- | --------- | ----------------- |\n| `name`        | `String`  | (required) The [transform function name](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function)\n| `stops`       | `Array`   | (required) An array of at least two transform stops. |\n| `unit`        | `String`  | (optional) Override the [default unit](#default-units). |\n\n```js\n// Example: rotate cells between -1rad at -300px, and 1rad at 300px:\n{\n  name: 'rotate',\n  unit: 'rad',\n  stops: [\n    [-300, -1],\n    [300, 1]\n  ]\n}\n```\n\n### Default units\n```js\nconst units = {\n  perspective: 'px',\n  rotate: 'deg',\n  rotateX: 'deg',\n  rotateY: 'deg',\n  rotateZ: 'deg',\n  skew: 'deg',\n  skewX: 'deg',\n  skewY: 'deg',\n  translateX: 'px',\n  translateY: 'px',\n  translateZ: 'px'\n}\n```\n\n## Examples\n- [Basic CodePen demo](http://codepen.io/elcontraption/pen/RGPboR)\n- [Simple cover-flow example](http://codepen.io/elcontraption/pen/jrdOqr)\n\n## Contributing\nContributions are welcome. Top priorities are to support `wrapAround: true` and units other than pixels for stop positions. See [issues](https://github.com/elcontraption/flickity-transformer/issues) for details. To get up and running:\n\n```bash\n# Install dependencies\n$ npm install\n\n# Lint, test \u0026 build\n$ npm run build\n\n# Run functional test in the browser\n$ npm run functional\n\n# See various scripts in package.json\n```\nUses [JavaScript Standard Style](http://standardjs.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felcontraption%2Fflickity-transformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felcontraption%2Fflickity-transformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felcontraption%2Fflickity-transformer/lists"}