← Back to Gallery
Card Brand Detection
Card brand is detected in real-time as the user types via BIN prefix matching. The detected brand icon highlights while others dim to 30% opacity.
Visual States
No Input
All 4 brand icons at full opacity
Typing "4242"
Visa highlighted, others dimmed (opacity 0.3)
Typing "5555"
Mastercard highlighted, others dimmed
Typing "3782"
Amex highlighted, others dimmed. CVC shows "4 digits"
CVC field shows "4 digits" placeholder (Amex uses 4-digit CVC)
Unknown Prefix
All icons dimmed
Formatting Differences
BIN Prefix Table
| Brand |
Prefix |
Max Digits |
CVC Length |
| Visa |
4 |
16 |
3 |
| Mastercard |
51-55, 2221-2720 |
16 |
3 |
| Amex |
34, 37 |
15 |
4 |
| Discover |
6011, 65, 644-649 |
16 |
3 |
Usage
<BlazeCheckout
onEvent={(event) => {
if (event.type === 'card_brand_detected') {
console.log('Brand:', event.brand)
}
}}
/>
Icon Styling
- Icons container: flex row, gap 8px, positioned right inside card number input
- Each icon: 32x20px, transition opacity 200ms
- Active: opacity 1
- Dimmed: opacity 0.3
- Uses simple SVG or colored rectangles with brand text to represent icons