{"id":13410860,"url":"https://github.com/kenwheeler/slick","last_synced_at":"2026-10-18T21:23:05.947Z","repository":{"id":15319082,"uuid":"18049133","full_name":"kenwheeler/slick","owner":"kenwheeler","description":"the last carousel you'll ever need","archived":false,"fork":false,"pushed_at":"2026-09-14T12:47:41.000Z","size":3804,"stargazers_count":28526,"open_issues_count":1266,"forks_count":5726,"subscribers_count":530,"default_branch":"master","last_synced_at":"2026-10-14T22:10:01.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"kenwheeler.github.io/slick","language":"JavaScript","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/kenwheeler.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":"CONTRIBUTING.markdown","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2014-03-24T02:10:05.000Z","updated_at":"2026-10-13T19:47:47.000Z","dependencies_parsed_at":"2026-10-07T21:11:58.866Z","dependency_job_id":null,"html_url":"https://github.com/kenwheeler/slick","commit_stats":{"total_commits":655,"total_committers":179,"mean_commits":3.659217877094972,"dds":0.8045801526717558,"last_synced_commit":"d126bd96f86024704e71f690acda8e4bd4bceef0"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/kenwheeler/slick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenwheeler%2Fslick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenwheeler%2Fslick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenwheeler%2Fslick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenwheeler%2Fslick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenwheeler","download_url":"https://codeload.github.com/kenwheeler/slick/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenwheeler%2Fslick/sbom","scorecard":{"id":555822,"data":{"date":"2025-08-11","repo":{"name":"github.com/kenwheeler/slick","commit":"5e2d0f03bd0f54ad9784c12e69ba2f7a3cccdf10"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.5,"checks":[{"name":"Code-Review","score":9,"reason":"Found 16/17 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T12:17:50.074Z","repository_id":15319082,"created_at":"2025-08-20T12:17:50.074Z","updated_at":"2025-08-20T12:17:50.074Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344794859,"owners_count":38329526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-14T02:00:06.392Z","response_time":82,"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-07-30T20:01:09.830Z","updated_at":"2026-10-18T21:23:05.942Z","avatar_url":"https://github.com/kenwheeler.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Sliders","Sliders [🔝](#readme)","Web 前端","JavaScript Libs","UI","Programming Languages","Animation","幻灯片","UI Interaction Libraries","Other"],"sub_categories":["Runner","Carousel","NodeJS","Images, Maps and Charts","运行器","运行器e2e测试","Mathematics"],"readme":"slick\n-------\n\n[1]: \u003chttps://github.com/kenwheeler/slick\u003e\n\n_the last carousel you'll ever need_\n\n#### Version 2.0\n\nVersion 2.0 is compatible with jQuery 4.\n\n#### Demo\n\n[http://kenwheeler.github.io/slick](http://kenwheeler.github.io/slick/)\n\n#### CDN\n\nTo start working with Slick right away, there's a couple of CDN choices available\nto serve the files as close, and fast as possible to your users:\n\n- https://cdnjs.com/libraries/slick-carousel\n- [https://cdn.jsdelivr.net/gh/kenwheeler/slick/](https://cdn.jsdelivr.net/gh/kenwheeler/slick/)\n\n##### Example using from jsDelivr\n\nJust add a link to the css file in your `\u003chead\u003e`. If you are using jQuery 4.0 or higher, use the following:\n\n```html\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@master/slick/slick.css\"/\u003e\n\u003c!-- Add the slick-theme.css if you want default styling --\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@master/slick/slick-theme.css\"/\u003e\n```\n\nThen, before your closing ```\u003cbody\u003e``` tag add:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@master/slick/slick.min.js\"\u003e\u003c/script\u003e\n```\n\nIf you are using jQuery 3.0 or lower, use the following:\n\n```html\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@1.8.1/slick/slick.css\"/\u003e\n\u003c!-- Add the slick-theme.css if you want default styling --\u003e\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@1.8.1/slick/slick-theme.css\"/\u003e\n```\n\nThen, before your closing ```\u003cbody\u003e``` tag add:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/gh/kenwheeler/slick@1.8.1/slick/slick.min.js\"\u003e\u003c/script\u003e\n```\n\n#### Package Managers\n\n```sh\n# Bower\nbower install --save slick-carousel\n\n# NPM\nnpm install slick-carousel\n```\n\n#### Contributing\n\nPLEASE review CONTRIBUTING.markdown prior to requesting a feature, filing a pull request or filing an issue.\n\n### Data Attribute Settings\n\nIn slick 1.5 you can now add settings using the data-slick attribute. You still need to call $(element).slick() to initialize slick on the element.\n\nExample:\n\n```html\n\u003cdiv data-slick='{\"slidesToShow\": 4, \"slidesToScroll\": 4}'\u003e\n  \u003cdiv\u003e\u003ch3\u003e1\u003c/h3\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003ch3\u003e2\u003c/h3\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003ch3\u003e3\u003c/h3\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003ch3\u003e4\u003c/h3\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003ch3\u003e5\u003c/h3\u003e\u003c/div\u003e\n  \u003cdiv\u003e\u003ch3\u003e6\u003c/h3\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Settings\n\nOption | Type | Default | Description\n------ | ---- | ------- | -----------\naccessibility | boolean | true | Enables tabbing and arrow key navigation.  Unless `autoplay: true`, sets browser focus to current slide (or first of current slide set, if multiple `slidesToShow`) after slide change. For full a11y compliance enable focusOnChange in addition to this.\nadaptiveHeight | boolean | false | Adapts slider height to the current slide\nappendArrows | string | $(element) | Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object)\nappendDots | string | $(element) | Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object)\narrows | boolean | true | Enable Next/Prev arrows\nasNavFor | string | $(element) | Enables syncing of multiple sliders\nautoplay | boolean | false | Enables auto play of slides\nautoplaySpeed | int  | 3000 | Auto play change interval\ncenterMode | boolean | false | Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts.\ncenterPadding | string | '50px' | Side padding when in center mode. (px or %)\ncssEase | string |  'ease' | CSS3 easing\ncustomPaging | function | n/a | Custom paging templates. See source for use example.\ndots | boolean | false | Current slide indicator dots\ndotsClass | string | 'slick-dots' | Class for slide indicator dots container\ndraggable | boolean | true | Enables desktop dragging\neasing | string |  'linear' | animate() fallback easing\nedgeFriction | integer | 0.15 | Resistance when swiping edges of non-infinite carousels\nfade | boolean | false | Enables fade\nfocusOnSelect | boolean | false | Enable focus on selected element (click)\nfocusOnChange | boolean | false | Puts focus on slide after change\ninfinite | boolean | true | Infinite looping\ninitialSlide | integer | 0 | Slide to start on\nlazyLoad | string | 'ondemand' | Accepts 'ondemand' or 'progressive' for lazy load technique. 'ondemand' will load the image as soon as you slide to it, 'progressive' loads one image after the other when the page loads.\nmobileFirst | boolean | false | Responsive settings use mobile first calculation\nnextArrow | string (html \\| jQuery selector) \\| object (DOM node \\| jQuery object) | `\u003cbutton type=\"button\" class=\"slick-next\"\u003eNext\u003c/button\u003e` | Allows you to select a node or customize the HTML for the \"Next\" arrow.\npauseOnDotsHover | boolean | false | Pauses autoplay when a dot is hovered\npauseOnFocus | boolean | true | Pauses autoplay when slider is focussed\npauseOnHover | boolean | true | Pauses autoplay on hover\nprevArrow | string (html \\| jQuery selector) \\| object (DOM node \\| jQuery object) | `\u003cbutton type=\"button\" class=\"slick-prev\"\u003ePrevious\u003c/button\u003e` | Allows you to select a node or customize the HTML for the \"Previous\" arrow.\nrespondTo | string | 'window' | Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two).\nresponsive | array | null | Array of objects [containing breakpoints and settings objects (see example)](#responsive-option-example). Enables settings at given `breakpoint`. Set `settings` to \"unslick\" instead of an object to disable slick at a given breakpoint.\nrows | int | 1 | Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row.\nrtl | boolean | false | Change the slider's direction to become right-to-left\nslide | string | '' | Slide element query\nslidesPerRow | int | 1 | With grid mode initialized via the rows option, this sets how many slides are in each grid row.\nslidesToScroll | int | 1 | # of slides to scroll at a time\nslidesToShow | int | 1 | # of slides to show at a time\nspeed | int | 300 | Transition speed\nswipe | boolean | true | Enables touch swipe\nswipeToSlide | boolean | false | Swipe to slide irrespective of slidesToScroll\ntouchMove | boolean | true | Enables slide moving with touch\ntouchThreshold | int | 5 | To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider.\nuseCSS | boolean | true | Enable/Disable CSS Transitions\nuseTransform | boolean | true | Enable/Disable CSS Transforms\nvariableWidth | boolean | false | Disables automatic slide width calculation\nvertical | boolean | false | Vertical slide direction\nverticalSwiping | boolean | false | Changes swipe direction to vertical\nwaitForAnimate | boolean | true | Ignores requests to advance the slide while animating\nzIndex | number | 1000 | Set the zIndex values for slides, useful for IE9 and lower\n\n##### Responsive Option Example\nThe responsive option, and value, is quite unique and powerful.\nYou can use it like so:\n\n```javascript\n$(\".slider\").slick({\n\n  // normal options...\n  infinite: false,\n\n  // the magic\n  responsive: [{\n\n      breakpoint: 1024,\n      settings: {\n        slidesToShow: 3,\n        infinite: true\n      }\n\n    }, {\n\n      breakpoint: 600,\n      settings: {\n        slidesToShow: 2,\n        dots: true\n      }\n\n    }, {\n\n      breakpoint: 300,\n      settings: \"unslick\" // destroys slick\n\n    }]\n});\n```\n\n\n\n\n### Events\n\nIn slick 1.4, callback methods were deprecated and replaced with events. Use them before the initialization of slick as shown below:\n\n```javascript\n// On swipe event\n$('.your-element').on('swipe', function(event, slick, direction){\n  console.log(direction);\n  // left\n});\n\n// On edge hit\n$('.your-element').on('edge', function(event, slick, direction){\n  console.log('edge was hit')\n});\n\n// On before slide change\n$('.your-element').on('beforeChange', function(event, slick, currentSlide, nextSlide){\n  console.log(nextSlide);\n});\n```\n\nEvent | Params | Description\n------ | -------- | -----------\nafterChange | event, slick, currentSlide | After slide change callback\nbeforeChange | event, slick, currentSlide, nextSlide | Before slide change callback\nbreakpoint | event, slick, breakpoint | Fires after a breakpoint is hit\ndestroy | event, slick | When slider is destroyed, or unslicked.\nedge | event, slick, direction | Fires when an edge is overscrolled in non-infinite mode.\ninit | event, slick | When Slick initializes for the first time callback. Note that this event should be defined before initializing the slider.\nreInit | event, slick | Every time Slick (re-)initializes callback\nsetPosition | event, slick | Every time Slick recalculates position\nswipe | event, slick, direction | Fires after swipe/drag\nlazyLoaded | event, slick, image, imageSource | Fires after image loads lazily\nlazyLoadError | event, slick, image, imageSource | Fires after image fails to load\n\n\n#### Methods\n\nMethods are called on slick instances through the slick method itself in version 1.4, see below:\n\n```javascript\n// Add a slide\n$('.your-element').slick('slickAdd',\"\u003cdiv\u003e\u003c/div\u003e\");\n\n// Get the current slide\nvar currentSlide = $('.your-element').slick('slickCurrentSlide');\n```\n\nThis new syntax allows you to call any internal slick method as well:\n\n```javascript\n// Manually refresh positioning of slick\n$('.your-element').slick('setPosition');\n```\n\n\nMethod | Argument | Description\n------ | -------- | -----------\n`slick` | options : object | Initializes Slick\n`unslick` |  | Destroys Slick\n`slickNext` |  |  Triggers next slide\n`slickPrev` | | Triggers previous slide\n`slickPause` | | Pause Autoplay\n`slickPlay` | | Start Autoplay (_will also set `autoplay` option to `true`_)\n`slickGoTo` | index : int, dontAnimate : bool | Goes to slide by index, skipping animation if second parameter is set to true\n`slickCurrentSlide` |  |  Returns the current slide index\n`slickAdd` | element : html or DOM object, index: int, addBefore: bool | Add a slide. If an index is provided, will add at that index, or before if addBefore is set. If no index is provided, add to the end or to the beginning if addBefore is set. Accepts HTML String || Object\n`slickRemove` | index: int, removeBefore: bool | Remove slide by index. If removeBefore is set true, remove slide preceding index, or the first slide if no index is specified. If removeBefore is set to false, remove the slide following index, or the last slide if no index is set.\n`slickFilter` | filter : selector or function | Filters slides using jQuery .filter syntax\n`slickUnfilter` | | Removes applied filter\n`slickGetOption` | option : string(option name) | Gets an option value.\n`slickSetOption` | change an option, `refresh` is always `boolean` and will update UI changes...\n | `option, value, refresh` | change a [single `option`](https://github.com/kenwheeler/slick#settings) to given `value`; `refresh` is optional.\n | `\"responsive\", [{ breakpoint: n, settings: {} }, ... ], refresh` | change or add [whole sets of responsive options](#responsive-option-example)\n | `{ option: value, option: value, ... }, refresh` | change  [multiple `option`s](https://github.com/kenwheeler/slick#settings) to corresponding `value`s.\n\n#### Example\n\nInitialize with:\n\n```javascript\n$(element).slick({\n  dots: true,\n  speed: 500\n});\n ```\n\nChange the speed with:\n\n```javascript\n$(element).slick('slickSetOption', 'speed', 5000, true);\n```\n\nDestroy with:\n\n```javascript\n$(element).slick('unslick');\n```\n\n#### Sass Variables\n\nVariable | Type | Default | Description\n------ | ---- | ------- | -----------\n$slick-font-path | string | \"./fonts/\" | Directory path for the slick icon font\n$slick-font-family | string | \"slick\" | Font-family for slick icon font\n$slick-loader-path | string | \"./\" | Directory path for the loader image\n$slick-arrow-color | color | white | Color of the left/right arrow icons\n$slick-dot-color | color | black | Color of the navigation dots\n$slick-dot-color-active | color | $slick-dot-color | Color of the active navigation dot\n$slick-prev-character | string | '\\2190' | Unicode character code for the previous arrow icon\n$slick-next-character | string | '\\2192' | Unicode character code for the next arrow icon\n$slick-dot-character | string | '\\2022' | Unicode character code for the navigation dot icon\n$slick-dot-size | pixels | 6px | Size of the navigation dots\n\n#### Browser support\n\nSlick works on IE8+ in addition to other modern browsers such as Chrome, Firefox, and Safari.\n\n#### Dependencies\n\njQuery 1.7\n\n#### License\n\nCopyright (c) 2017 Ken Wheeler\n\nLicensed under the MIT license.\n\nFree as in Bacon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenwheeler%2Fslick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenwheeler%2Fslick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenwheeler%2Fslick/lists"}