{"name":"nuka-carousel","version":"5.0.3","description":"Pure React Carousel","main":"index.js","module":"es/index.js","jsnext:main":"es/index.js","types":"index.d.ts","engines":{"node":">=12.0.0"},"dependencies":{},"devDependencies":{"d3-ease":"^1.0.3","exenv":"^1.2.0","prop-types":"^15.6.0","react-move":"^6.5.0","@babel/cli":"^7.10.4","@babel/core":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.10.4","@babel/plugin-transform-object-assign":"^7.10.4","@babel/plugin-transform-runtime":"^7.10.4","@babel/plugin-transform-typescript":"^7.16.8","@babel/polyfill":"^7.10.4","@babel/preset-env":"^7.10.4","@babel/preset-react":"^7.10.4","@storybook/addon-actions":"^6.4.18","@storybook/addon-essentials":"^6.4.18","@storybook/addon-links":"^6.4.18","@storybook/builder-webpack5":"^6.4.18","@storybook/manager-webpack5":"^6.4.18","@storybook/react":"^6.4.18","@types/d3-ease":"^3.0.0","@types/exenv":"^1.2.0","@types/react":"^16.9.56","@types/react-dom":"^17.0.11","@typescript-eslint/eslint-plugin":"^5.5.0","@typescript-eslint/parser":"^5.5.0","babel-loader":"8.1.0","builder":"^5.0.0","chromatic":"^6.2.0","cypress":"^9.3.1","enzyme":"^3.3.0","enzyme-adapter-react-16":"^1.15.6","eslint":"^8.3.0","eslint-config-formidable":"^4.0.0","eslint-config-jest-enzyme":"^7.1.2","eslint-config-prettier":"^2.9.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-filenames":"^1.3.2","eslint-plugin-import":"^2.25.3","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.27.1","jest":"^24.7.1","jest-enzyme":"^7.0.2","prettier":"2.1.2","react":"^16.9.0","react-dom":"^16.9.0","typescript":"^4.5.2","url-loader":"^4.1.1","webpack":"5.61.0","webpack-cli":"^4.9.1","webpack-dev-server":"^4.6.0"},"peerDependencies":{"react":"^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.1","react-dom":"^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.1"},"resolutions":{"jsdom":"^14.0.0"},"scripts":{"build-v5":"builder concurrent --buffer build-v5-lib build-v5-es","build-v5-babel":"babel src-v5 --extensions .ts,.tsx","build-v5-es":"builder run  --env \"{\\\"BABEL_ENV\\\":\\\"esm\\\"}\" build-v5-babel -- -d es-v5","build-v5-lib":"builder run build-v5-babel -- -d lib-v5","build":"builder concurrent --buffer build-lib build-es","build-babel":"babel src","build-dist":"webpack --config webpack.dist.config.js --mode production","build-es":"builder run  --env \"{\\\"BABEL_ENV\\\":\\\"esm\\\"}\" build-babel -- -d es","build-lib":"builder run build-babel -- -d lib","build-watch":"builder concurrent build-lib build-es -- --watch","check":"npm run lint && npm run check-typescript && npm run test","check-typescript":"tsc --noEmit","lint":"eslint --ext .js,.ts,.tsx .","lint-fix":"eslint --ext .js,.ts,.tsx . --fix","prettier":"prettier \"**/*.{js,json,ts,tsx,css,md}\"","prettier-fix":"prettier \"**/*.{js,json,ts,tsx,css,md}\" --write","preversion":"npm run check","start":"webpack-dev-server --mode development","start:next":"cd ./examples/nextjs && yarn dev","start:next:ci":"cd ./examples/nextjs && yarn install && yarn dev","test":"jest test --config jest.unit.config.js","test:e2e":"cypress open","test:e2e:ci":"cypress run","version":"npm run build","storybook":"start-storybook -p 6006","storybook-build":"build-storybook","chromatic":"chromatic --exit-zero-on-changes"},"repository":{"type":"git","url":"git+https://github.com/FormidableLabs/nuka-carousel.git"},"keywords":["react","carousel","nuka"],"author":{"name":"@FormidableLabs"},"license":"MIT","bugs":{"url":"https://github.com/FormidableLabs/nuka-carousel/issues"},"homepage":"https://github.com/FormidableLabs/nuka-carousel","sideEffects":false,"readme":"[![Maintenance Status][maintenance-image]](#maintenance-status)\n\n# nuka-carousel\n\n> :warning: nuka-carousel v5 beta is published and you can install it like this `npm install nuka-carousel@5.0.2`. Please check the [v5 documentation](https://github.com/FormidableLabs/nuka-carousel/tree/main/src-v5) for more details. \n\nA Pure ReactJS Carousel Component\n\n![Nuka Carousel Animated Example](https://i.imgur.com/UwP5gle.gif)\n\n### Install\n\nTo add `nuka-carousel` to your project run the following command in your project folder.\n\n```bash\n$ yarn add nuka-carousel\n```\n\nOR\n\n```bash\n$ npm install nuka-carousel\n```\n\n### Example\n\n```jsx\nimport React from 'react';\nimport Carousel from 'nuka-carousel';\n\nexport default class extends React.Component {\n  render() {\n    return (\n      <Carousel>\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide1\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide2\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide3\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide4\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide5\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide6\" />\n      </Carousel>\n    );\n  }\n}\n```\n\n### Running demo locally\n\nThe demo can be launched on your local machine via `webpack-dev-server`. Once you have cloned this repo locally, run the following:\n\n```bash\nyarn\nyarn build\nyarn start\n```\n\nYou can access the application on your localhost at the following url: <a href=\"http://localhost:8080/demo\" target=\"_blank\">Local Demo</a>\n\nOr on CodeSandBox: [![Edit silly-rhodes-5pr2i](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/silly-rosalind-6y7f3)\n\n### Running Storybook\n\nOnce you have cloned this repo locally, run the following to launch Storybook:\n\n```bash\nyarn\nyarn storybook\n```\n\nYou can access Storybook on your localhost at the following url: <a href=\"http://localhost:6006/\" target=\"_blank\">Storybook</a>\n\n### Keyboard Controls\n\n| Key Combination            | Function                                            |\n| -------------------------- | --------------------------------------------------- |\n| Right/Up Arrow or D/W key  | Next slide                                          |\n| Left/Down Arrow or A/S key | Previous slide                                      |\n| Q key                      | First slide                                         |\n| E key                      | Last slide                                          |\n| SpaceBar                   | When `autoplay={true}` pauses and unpauses carousel |\n\n- Keyboard shortcuts are disabled as a default. To enable them set `enableKeyboardControls` prop to `true`.\n- `keyCodeConfig` prop can be used to configure the default keyCodes\n\n### Props\n\n| Name                       | PropType                                                                                                                                                                                                                                                                                                                                                                                                            | Description                                                                                                                                                                                                                                                                                 | Default                                                                                                            |\n| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------- |\n| afterSlide                 | `React.PropTypes.func`                                                                                                                                                                                                                                                                                                                                                                                              | Hook to be called after a slide is changed.                                                                                                                                                                                                                                                 |                                                                                                                    |\n| animation                  | `React.PropTypes.oneOf(['zoom'])`                                                                                                                                                                                                                                                                                                                                                                                   | Adds a zoom effect on the currently visible slide. A `transform: scale(0.85)` is set as default, however, the scale can be customized using `zoomScale` prop. Property is applied on all slides except the current 1. Use `cellAlign` to align the slide with zoom effect where you'd like. |                                                                                                                    |\n| autoGenerateStyleTag       | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | When set to `true`, it will generate a `style` tag to help ensure images are displayed properly. Set to `false` if you don't want or need the style tag generated.                                                                                                                          | `true`                                                                                                             |\n| autoplay                   | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Autoplay mode active.                                                                                                                                                                                                                                                                       | `false`                                                                                                            |\n| autoplayInterval           | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Interval for autoplay iteration.                                                                                                                                                                                                                                                            | `3000 milliseconds`                                                                                                |\n| autoplayReverse            | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Only meaningful when `autoplay` is already true. When `autoplayReverse` is also true, autorotation cycles through slides indexes from high to low.                                                                                                                                          | `false`                                                                                                            |\n| beforeSlide                | `React.PropTypes.func`                                                                                                                                                                                                                                                                                                                                                                                              | Hook to be called before a slide is changed                                                                                                                                                                                                                                                 |                                                                                                                    |\n| cellAlign                  | `React.PropTypes.oneOf(['left', 'center', 'right'])`                                                                                                                                                                                                                                                                                                                                                                | When displaying more than one slide, sets which position to anchor the current slide to. **Is overridden to `left` when `transitionMode=\"fade\"`**                                                                                                                                           |                                                                                                                    |\n| cellSpacing                | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Space between slides, as an integer, but reflected as `px`                                                                                                                                                                                                                                  |                                                                                                                    |\n| enableKeyboardControls     | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | When set to `true` will enable keyboard controls when the carousel has focus. If the carousel does not have focus, keyboard controls will be ignored.                                                                                                                                       | `false`                                                                                                            |\n| keyCodeConfig              | `PropTypes.exact({ previousSlide: PropTypes.arrayOf(PropTypes.number), nextSlide: PropTypes.arrayOf(PropTypes.number), firstSlide: PropTypes.arrayOf(PropTypes.number), lastSlide: PropTypes.arrayOf(PropTypes.number), pause: PropTypes.arrayOf(PropTypes.number) })`                                                                                                                                              | If `enableKeyboardControls` prop is true, you can pass configuration for the keyCode so you can override the default keyboard keys configured.                                                                                                                                              | `{ nextSlide: [39, 68, 38, 87], previousSlide: [37, 65, 40, 83], firstSlide: [81], lastSlide: [69], pause: [32] }` |\n| getControlsContainerStyles | `React.PropTypes.func`                                                                                                                                                                                                                                                                                                                                                                                              | callback function to provide style to controls containers                                                                                                                                                                                                                                   |                                                                                                                    |\n| defaultControlsConfig      | `React.PropTypes.shape({ containerClassName: PropTypes.string, nextButtonClassName: PropTypes.string, nextButtonStyle: Proptypes.object, nextButtonText: PropTypes.string, prevButtonClassName: PropTypes.string, prevButtonStyle: PropTypes.object, prevButtonText: PropTypes.string, pagingDotsContainerClassName: PropTypes.string, pagingDotsClassName: PropTypes.string, pagingDotsStyle: PropTypes.object })` | This prop lets you apply custom classes and styles to the default `Container`. `Next`, `Previous`, and `Paging Dots` controls. More information on how to customize these controls can be found below.                                                                                      | `{}`                                                                                                               |\n| disableAnimation           | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | When set to `true`, will disable animation.                                                                                                                                                                                                                                                 | `false`                                                                                                            |\n| disableEdgeSwiping         | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | When set to `true`, will disable swiping before first slide and after last slide.                                                                                                                                                                                                           | `false`                                                                                                            |\n| dragging                   | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Enable mouse swipe/dragging.                                                                                                                                                                                                                                                                | `true`                                                                                                             |\n| easing                     | `React.PropTypes.string`                                                                                                                                                                                                                                                                                                                                                                                            | Animation easing function. See valid easings here: [D3 Easing Functions](https://github.com/d3/d3-ease)                                                                                                                                                                                     |                                                                                                                    |\n| edgeEasing                 | `React.PropTypes.string`                                                                                                                                                                                                                                                                                                                                                                                            | Animation easing function when swipe exceeds edge. See valid easings here: [D3 Easing Functions](https://github.com/d3/d3-ease)                                                                                                                                                             |                                                                                                                    |\n| frameOverflow              | `React.PropTypes.string`                                                                                                                                                                                                                                                                                                                                                                                            | Used to set overflow style property on slider frame.                                                                                                                                                                                                                                        | `hidden`                                                                                                           |\n| framePadding               | `React.PropTypes.string`                                                                                                                                                                                                                                                                                                                                                                                            | Used to set the margin of the slider frame. Accepts any string dimension value such as `\"0px 20px\"` or `\"500px\"`                                                                                                                                                                            |                                                                                                                    |\n| heightMode                 | `React.PropTypes.oneOf(['first', 'current', 'max'])`                                                                                                                                                                                                                                                                                                                                                                | Change the height of the slides based either on the first slide, the current slide, or the maximum height of all slides. Overrides height set by `initialSlideHeight`                                                                                                                       |                                                                                                                    |\n| innerRef                   | `React.PropTypes.oneOfType([ React.PropTypes.func, React.PropTypes.shape({ current: React.PropTypes.elementType })])`                                                                                                                                                                                                                                                                                               | React `ref` that should be set on the carousel element                                                                                                                                                                                                                                      |                                                                                                                    |\n| initialSlideHeight         | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Initial height of the slides in pixels.                                                                                                                                                                                                                                                     | `100`                                                                                                              |\n| initialSlideWidth          | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Initial width of the slides in pixels                                                                                                                                                                                                                                                       |                                                                                                                    |\n| pauseOnHover               | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Pause autoPlay when mouse is over carousel.                                                                                                                                                                                                                                                 | `true`                                                                                                             |\n| renderAnnounceSlideMessage | `React.PropTypes.func`                                                                                                                                                                                                                                                                                                                                                                                              | Renders message in the ARIA live region that is announcing the current slide on slide change                                                                                                                                                                                                | Render function that returns `\"Slide {currentSlide + 1} of {slideCount}\"`                                          |\n| scrollMode                 | `React.PropTypes.oneOf(['page', 'remainder'])`                                                                                                                                                                                                                                                                                                                                                                      | When `scrollMode` is set to `remainder`, the carousel will only scroll the amount of slides necessary without showing blank slides. If `scrollMode` is set to `page` then `slidesToScroll` will equal `slidesToShow` and the final page may contain blank slides.                           | `remainder`                                                                                                        |\n| slideIndex                 | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Manually set the index of the slide to be shown                                                                                                                                                                                                                                             |                                                                                                                    |\n| slideOffset                | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | While using prop `animation = \"zoom\"`, you can configure space around current slide with slideOffset.                                                                                                                                                                                       | 25                                                                                                                 |\n| slidesToScroll             | `React.PropTypes.oneOfType([ React.PropTypes.number, React.PropTypes.oneOf(['auto'])])`                                                                                                                                                                                                                                                                                                                             | Slides to scroll at once. Set to `\"auto\"` to always scroll the current number of visible slides. Is overridden to `slidesToShow` when `transitionMode=\"fade\"`                                                                                                                               |                                                                                                                    |\n| slidesToShow               | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Number of slides to show at once. Will be cast to an `integer` when `transitionMode=\"fade\"`                                                                                                                                                                                                 |                                                                                                                    |\n| slideWidth                 | `React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number])`                                                                                                                                                                                                                                                                                                                                       | Manually set slideWidth. If you want hard pixel widths, use a string like `slideWidth=\"20px\"`, and if you prefer a percentage of the container, use a decimal integer like `slideWidth={0.8}`                                                                                               |                                                                                                                    |\n| speed                      | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Animation duration/Transition speed in milliseconds                                                                                                                                                                                                                                         |                                                                                                                    |\n| swiping                    | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Enable touch swipe/dragging                                                                                                                                                                                                                                                                 | `true`                                                                                                             |\n| transitionMode             | `React.PropTypes.oneOf(['scroll', 'fade', 'scroll3d'])`                                                                                                                                                                                                                                                                                                                                                             | Set the way slides transition from one to the next.                                                                                                                                                                                                                                         | `scroll`                                                                                                           |\n| vertical                   | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Enable the slides to transition vertically                                                                                                                                                                                                                                                  |                                                                                                                    |\n| width                      | `React.PropTypes.string`                                                                                                                                                                                                                                                                                                                                                                                            | Used to hardcode the slider width. Accepts any string dimension value such as `\"80%\"` or `\"500px\"`                                                                                                                                                                                          |                                                                                                                    |\n| withoutControls            | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Used to remove all controls at once. Overwrites the `render[Top, Right, Bottom, Left]CenterControls()`.                                                                                                                                                                                     | `false`                                                                                                            |\n| wrapAround                 | `React.PropTypes.bool`                                                                                                                                                                                                                                                                                                                                                                                              | Sets infinite wrapAround mode. An option similar to repeat or infinite in other libs.                                                                                                                                                                                                       | `false`                                                                                                            |\n| zoomScale                  | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Adds a number value to set the scale of zoom when `animation === \"zoom\"`. The number value should be set in a range of (0,1). The default value is set to `zoomScale: 0.85`                                                                                                                 |\n| opacityScale               | `React.PropTypes.number`                                                                                                                                                                                                                                                                                                                                                                                            | Adds a number value to set the scale of the opacity for the 'scroll3d' transition mode. The number value should be set in a range of (0,1). The default value is set to `opacityScale: 0.65`                                                                                                |\n| onDragStart                | `React.PropTypes.func`                                                                                                                                                                                                                                                                                                                                                                                              | Adds a callback to capture event at the start of swiping/dragging slides                                                                                                                                                                                                                    |\n\n#### render\\*Controls\n\n`React.PropTypes.func`\n\nA set of eight render props for rendering controls in different positions around the carousel.\n\n- Valid render props for the eight positions are `renderTopLeftControls`, `renderTopCenterControls`, `renderTopRightControls`, `renderCenterLeftControls`, `renderCenterCenterControls`, `renderCenterRightControls`, `renderBottomLeftControls`, `renderBottomCenterControls`, and `renderBottomRightControls`.\n\n- The default props are set as `renderCenterLeftControls` for `Previous` button, `renderCenterRightControls` for the `Next` button and `renderBottomCenterControls` for the \"Paging dots\". To change the position or remove \"Paging dots\", the default positions need to be disabled by setting them to null.\n\n```jsx\n<Carousel\n  renderTopCenterControls={({ currentSlide }) => (\n    <div>Slide: {currentSlide}</div>\n  )}\n  renderCenterLeftControls={({ previousSlide }) => (\n    <button onClick={previousSlide}>Previous</button>\n  )}\n  renderCenterRightControls={({ nextSlide }) => (\n    <button onClick={nextSlide}>Next</button>\n  )}\n>\n  {/* Carousel Content */}\n</Carousel>\n```\n\n- The function returns the props for `goToSlide`, `nextSlide` and `previousSlide` functions, in addition to `slideCount` and `currentSlide` values. You can also remove all render controls using `withoutControls`.\n\n- NOTE: The className `slide-visible` is added to the currently visible slide or slides (when `slidesToShow` > 1). The className `slide-current` is added to the currently \"active\" slide.\n\n#### renderAnnounceSlideMessage\n\n`React.PropTypes.func`\n\n`renderAnnounceSlideMessage` render prop is a special case of the `render*Controls` props. It's responsibility is to render ARIA live announcement message to improve accessibility. The prop will announce the message you pass in every time the slide changes with `VoiceOver` enabled on your machine. The function returns only `slideCount` and `currentSlide` values.\n\n```jsx\n<Carousel\n  renderAnnounceSlideMessage={({ currentSlide, slideCount }) =>\n    `Slide ${currentSlide + 1} of ${slideCount}`\n  }\n>\n  {/* Carousel Content */}\n</Carousel>\n```\n\n#### getControlsContainerStyles\n\n`React.PropTypes.func`\n\n`getControlsContainerStyles` is a function prop that will be called with a key argument being one of the following: `TopLeft` | `TopCenter` | `TopRight` | `CenterLeft` | `CenterCenter` | `CenterRight` | `BottomLeft` | `BottomCenter` | `BottomRight`.\nThe function will then return CSS Properties.\n\n```jsx\n<Carousel\n  getControlsContainerStyles={(key) => {\n     switch (key) {\n        case 'TopLeft':\n          return {\n            backgroundColor: \"red\",\n          };\n        default:\n          // will apply all other keys\n          return {\n            backgroundColor: \"blue\",\n          };\n      }\n  }} />\n>\n  {/* Carousel Content */}\n</Carousel>\n```\n\n#### defaultControlsConfig\n\n```\nReact.PropTypes.shape({\n  nextButtonClassName: PropTypes.string,\n  nextButtonStyle: PropTypes.object,\n  nextButtonText: PropTypes.string,\n  prevButtonClassName: PropTypes.string,\n  prevButtonStyle: PropTypes.object,\n  prevButtonText: PropTypes.string,\n  pagingDotsContainerClassName: PropTypes.string,\n  pagingDotsClassName: PropTypes.string,\n  pagingDotsStyle: PropTypes.object\n})\n```\n\nThe default controls used by Nuka are the `Previous` button, `Next` button, and `PagingDots` control. The visual look and text of these controls can be modified with props as described below:\n\n- The props ending with `ClassName` let you apply a custom css class to its respective control.\n- The props ending with `Style` let you apply inline styles to its respective control.\n- The text label for the `Previous` button and `Next` button can be customized using `prevButtonText` and `nextButtonText`, respectively.\n\nFor example, you can change the text of the `Previous` and `Next` buttons, and change the paging dots to red by passing in the following configuration:\n\n```\ndefaultControlsConfig={{\n  nextButtonText: 'Custom Next',\n  prevButtonText: 'Custom Prev',\n  pagingDotsStyle: {\n    fill: 'red'\n  }\n}}\n```\n\n### External Control of Carousel State\n\nYou can control the state of the carousel from your parent component as shown below:\n\n```jsx\nimport React from 'react';\nimport Carousel from 'nuka-carousel';\n\nexport default class extends React.Component {\n  state = {\n    slideIndex: 0\n  };\n\n  render() {\n    return (\n      <Carousel\n        slideIndex={this.state.slideIndex}\n        afterSlide={(slideIndex) => this.setState({ slideIndex })}\n      >\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide1\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide2\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide3\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide4\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide5\" />\n        <img src=\"https://via.placeholder.com/400/ffffff/c0392b/&text=slide6\" />\n      </Carousel>\n    );\n  }\n}\n```\n\n### TypeScript\n\nTypeScript type definitions are now shipped with nuka-carousel. You can use them directly from the library.\n\n### Resizing Height\n\n#### How resizing works\n\nIn componentDidMount, the initial dimensions are assigned to each slide:\n\n- Width: `initialSlideWidth` || `slideWidth` || (`slidesToShow` / width of container)\n- Height: `initialSlideHeight`\n\nAfter the component completes mounting with the accurate width, it tries to calculate the desired height of the content (`current`, `first`, `max`). If that calculation fails (perhaps because slide images are still loading), it'll wait a bit and try again. Once successful, that measurement then replaces `initialSlideHeight` with the measured height in pixels.\n\n### Contributing\n\nSee the [Contribution Docs](CONTRIBUTING.md).\n\n### Maintenance Status\n\n**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.\n\n[maintenance-image]: https://img.shields.io/badge/maintenance-active-green.svg\n\n","readmeFilename":"README.md","gitHead":"faac84861542a117fe277abd9211a761166cea79","_id":"nuka-carousel@5.0.3","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-D/CzZmKWVu0VMlEfX4xlWVQymozdKJYF7nyjlfo9yzROb/CjWRP7CqptnJfrBVmbtCiwKGLhS++Q9Xn5IX8XQQ==","shasum":"3a9f5b6662c52e7f7c5f819129dabd99677539b1","tarball":"http://registry-npm.ywwl.com/nuka-carousel/download/nuka-carousel-5.0.3.tgz","fileCount":27,"unpackedSize":154042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHjX9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFcA/+LWrsdrJ6lp/KJXjBgR1VeWjlem/ODPp37nri1j1/AWnLWoX1\r\nzJ7PsfY6Coxv7u5nTTcl2G1jsFKY0JbTceekWtvDVzqSyy24CP/oIFgUxJii\r\nueoULV5/XhZnE7f+eGGibO4tXjFKwrD29LnTh9bEas9H0Ym4c8KSM2ZbgiNc\r\nzZY4XgTsS8MFlr8zSky4MJJCP0SAgDs9OALPfDzqDX9E77RUuD3V2p2ZKGqL\r\nCxk1aDOCWZU2QXT5rn2lNXomsfpieAPRYapMgZM+KeENc+i5t7Zf0COyTmz4\r\nO3bhYw/ow6nXigj/+X1OAtnI5NX8p5pHsbcXMeH89EkriqjDI9wEKwUyzLwz\r\nEZwbMSB9lpcISN7mHKkjeeNcYx59zRTlw3UEdOqbHZK7lrf1mwPqwrrEeJub\r\nIkfVBC6O+O0/T2HbYr2u1oucz/CtZXQuCJZ6rrrLFgQn4RwM5xSqEYaemwog\r\nW16is/8Nio/AyVcRiklvWY9mo59R4J3s9ICIS+u3lI9SZadACzDWyJ7trCQB\r\n8+8qdlib5jCPefm56kJijw5tXQdwzLij5OudeaFtaruvcl8ki3VRZytru5Mt\r\n/UKf2Q2VNlPOoGSTdzaWahmNfBSoILrtcLlrFf5zFqBPdn4dHbBssPr/AuxN\r\n6KnPfHqBtg7cgfMkDFcgI8yIpjTwJlvJ38k=\r\n=3CRw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEUoZkvtW+DYKIJJNmZqFXwM28Fy3T9lTfvjzIXP1hDyAiBV6sETGEBKm8mWWqjYn/yO3fG7pVl7QHkLnFpiO0W8ZQ=="}],"size":22190,"noattachment":false,"key":"/nuka-carousel/-/nuka-carousel-5.0.3.tgz"},"_npmUser":{"name":"valgeorgiev","email":"valentin.al.georgiev@gmail.com"},"directories":{},"maintainers":[{"name":"jpdriver","email":"jpsdriver@gmail.com"},{"name":"yankovalera","email":"yankovalera@gmail.com"},{"name":"valgeorgiev","email":"valentin.al.georgiev@gmail.com"},{"name":"michaelmerrill","email":"michael@michaelmerrill.me"},{"name":"sarmeyer","email":"sarahmichellemeyer@gmail.com"},{"name":"mariano-formidable","email":"mariano.martinez@formidable.com"},{"name":"carlospaelinck","email":"me@carlos.dev"},{"name":"ryanisinallofus","email":"ryanrray@gmail.com"},{"name":"samwhale","email":"samuelestrella226@gmail.com"},{"name":"ryan.roemer","email":"ryan@loose-bits.com"},{"name":"formidable-owner","email":"admin@formidablelabs.com"},{"name":"eastridge","email":"ryan@eastridge.me"},{"name":"exogen","email":"exogen@gmail.com"},{"name":"beccanelson","email":"becca.bailey@formidable.com"},{"name":"philpl","email":"phil@kitten.sh"},{"name":"hartzis","email":"brianhartz@gmail.com"},{"name":"mfulgham","email":"monet.fulgham@formidable.com"},{"name":"jmcbee1","email":"jmcbee1@gmail.com"},{"name":"formidablelabs","email":"npm@formidablelabs.com"},{"name":"carbonrobot","email":"carbonrobot@gmail.com"},{"name":"manosim","email":"hello@manos.im"},{"name":"masiddee","email":"mansoor@msiddeeq.com"},{"name":"thekenwheeler","email":"ken_wheeler@me.com"},{"name":"stefvhuynh","email":"huynh.stefan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nuka-carousel_5.0.3_1646147069378_0.5208946598850923"},"_hasShrinkwrap":false,"publish_time":1646147069573,"_cnpm_publish_time":1646147069573,"dist-tags":{"beta":"5.0.5","latest":"8.2.0"}}