Basic Usage
With Dynamic Label
Use thelabel prop with {{value}} placeholder to show dynamic calculations based on the selected price.
With Feature Data
Display feature lists below each price option with icons from Lucide React.Hide Custom Amount
Props
Predefined price options (scrollable horizontally).Each option object:
price(number, required): The price valuedata(array, optional): Optional feature list shown below price with iconstitle(string): Feature description texticon(string, optional): Lucide icon name (e.g., “Check”, “Coffee”, “Heart”)
Currency symbol (e.g., ”€”, ”$”).
Pre-select an option by price value.
Floating label above options. Use
{{value}} placeholder for dynamic calculation based on labelValueConversion.Multiplier for
{{value}} in label (e.g., 0.1 converts 100€ to “10 coffees”).Hide custom amount input field.
Custom element shown below custom amount input.
Callback with selected/entered price. Validates minimum price from the first option.
Custom styles for the container.
Custom styles for the options container.
Features
- Automatic Centering: Selected option automatically scrolls to center
- Number Formatting: Uses Spanish locale formatting with thousand separators
- Minimum Validation: Custom input validates against minimum price (first option)
- Dynamic Font Sizing: Automatically adjusts font size based on price length
- Hover States: Interactive hover effects on all price options
- Error Display: Shows error message when custom amount is below minimum