A custom React component for replacing the default HTML select element, built using the Swiper.js library. This mobile-ready component offers a carousel slider for displaying and selecting options, easily usable with a finger, mouse, or keyboard. It comes with built-in customization options to seamlessly integrate with your application's style.
- Mobile-ready and responsive design
- Customizable appearance with various configuration options
- Keyboard support (configurable)
Test the component by either cloning the repository or visiting the temporary site it's currently hosted on.
git clone git@github.com:fredkorts/afterpay-select.git afterpay-select
npm i
npm run dev
To build the app, run
npm run build
https://67c2d22c.afterpay-select.pages.dev/
- subtitle (string) - Modify the text on the card, which defaults to "€/Month".
- primaryColor (string) - Change the color of the default options and the subtitle text.
- secondaryColor (string) - Change the color of the arrows and the currently selected value.
- backgroundColor (string) - Change the background color, which is white (#fff) by default.
- keyboardEnabled (boolean) - Disable or enable keyboard support. Adding this option without a value defaults to true.