
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-elastic-carousel
Advanced tools
A flexible and responsive carousel component for react
Element resize support (true responsiveness)
Most of the carousel components are responsive to the viewport size, but this is not a real responsive support as we can have an element with a width:500px
on a 1200px
screen, most carousel component will "think" we are on a 1200px
mode because they "watch" the view-port's size and not the wrapping element's size.
This is the reason why react-eleastic-carousel
is using the resize-observer which gives us a true responsive support, not matter on what screen size we are.
RTL (right-to-left) support
Supporting right-to-left languages requires a full support for right-to-left rendering and animations which is not supported in most of the carousel components out there. also, right-to-left support is important and should be a standard for most applications.
npm install --save react-elastic-carousel
or
yarn add react-elastic-carousel
react-elastic-carousel
is using styled-components for styling, this means that you should install it as well:
npm install --save styled-components
import React, { Component } from 'react';
import Carousel from 'react-elastic-carousel';
class App extends Component {
state = {
items: [
{id: 1, title: 'item #1'},
{id: 2, title: 'item #2'},
{id: 3, title: 'item #3'},
{id: 4, title: 'item #4'},
{id: 5, title: 'item #5'}
]
}
render () {
const { items } = this.state;
return (
<Carousel>
{items.map(item => <div key={item.id}>{item.title}</div>)}
</Carousel>
)
}
}
git clone https://github.com/sag1v/react-elastic-carousel.git
cd react-elastic-carousel
yarn
yarn start
The application is running at http://localhost:8888
MIT © sag1v
FAQs
A flexible and responsive carousel component for react
The npm package react-elastic-carousel receives a total of 13,686 weekly downloads. As such, react-elastic-carousel popularity was classified as popular.
We found that react-elastic-carousel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.