Input Card Number Dynamic

Mask the value of the input to be formatted like a card number with the x-mask Alpine JS plugin. Masking based on card type.

This uses the official Alpine JS x-mask plugin.

Example

Code