FormidableLabs / FormidableLabs/react-swipeable
How to change the width of each slide ?
- Langage dominant
- TypeScript
- Étoiles
- 2.1k
- Forks
- 149
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hi,
I am trying to use this demo [https://codesandbox.io/s/react-swipeable-image-carousel-hben8](url) in my project, but I need to reduce the width of each slide. I tried to set the width, but this made the space between each slide larger. I also tried to add the condition if (!props.sliding) return "none" at the component.tsx, this reduced the space but made the swipe effect not smooth.
Could you please tell me the way to change the width of the slide without making the space between each slide larger?
Thank you.
Regards,
Elva
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le CodeSandbox lié et examinez component.tsx, en vous concentrant sur la manière dont la largeur de la diapositive, l’espacement et la condition de défilement sont coordonnés. Reproduisez le cas de largeur réduite et vérifiez que le comportement final conserve les écarts inchangés tout en préservant un effet de swipe fluide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100