import React, { useState } from "react"; import { useKeenSlider } from "keen-slider/react"; import "keen-slider/keen-slider.min.css"; import { couponIcon, chevronDownPurpleCustom } from "../assets/images"; export default function Pricing() { const adminData = (window as any).icegramExpressAdminData; // Plan icon assets - using new Figma icons const freePlanIcon = `${adminData.baseUrl}/images/plan-icon-free.svg`; const freePlanCurrentIcon = `${adminData.baseUrl}/images/plan-current-icon.svg`; const proPlanIcon = `${adminData.baseUrl}/images/plan-icon-pro-new.svg`; const maxPlanIcon = `${adminData.baseUrl}/images/plan-icon-max.svg`; // FAQ collapse state const [openFaqIdx, setOpenFaqIdx] = useState(0); // Keen-slider setup (must be inside function component) const [currentSlide, setCurrentSlide] = useState(0); const [sliderRef, instanceRef] = useKeenSlider({ slides: { perView: 2.5, spacing: 32 }, loop: true, slideChanged(slider) { setCurrentSlide(slider.track.details.rel); }, }); // Set page background color if (typeof document !== 'undefined') { document.body.style.background = '#F6F5F8'; } const [showAll, setShowAll] = useState(false); // Figma asset constants - using proper pricing assets const pricingInfoIcon = `${adminData.baseUrl}/images/pricing-info-icon.svg`; const pricingCrossIcon = `${adminData.baseUrl}/images/pricing-cross-icon.svg`; const checkmarkLargeIcon = `${adminData.baseUrl}/images/checkmark-large.svg`; // Features grouped by section const crossIcon = Unavailable; const checkmarkLarge = Included; const emailManagementFeatures = [ { name: "3rd Party SMTP Configuration", free: "Pepipost", pro: "Default SMTP", max: "Amazon SES, Mailgun, SendGrid, SparkPost, Postmark, Sendinblue, Mailjet & Mailersend.", icon: pricingInfoIcon, tooltipMsg: "Connect With SMTP Services To Reliable Send Transactional Emails. Also Supports Automatic Bounce Handling.", }, { name: "Detailed Reports/Analytics", free: "Overall Summary", pro: "Overall Summary", max: "Detailed Report", icon: pricingInfoIcon, tooltipMsg: "Get comprehensive analytics and detailed reports about your email campaigns performance and engagement metrics.", }, { name: "Weekly Summary Email", free: "Basic Summary", pro: "Basic Summary", max: "Advanced Summary", icon: pricingInfoIcon, tooltipMsg: "Receive automated weekly summary emails with key metrics and insights about your email campaigns.", }, { name: "Drag and Drop Campaign Editor", free: "Basic Blocks", pro: "Advanced Blocks", max: "Advanced Blocks", icon: pricingInfoIcon, tooltipMsg: "Create beautiful email campaigns with our intuitive drag and drop editor featuring various content blocks.", }, { name: "Automatic Batch Sending", free: crossIcon, pro: checkmarkLarge, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Automatically send emails in batches to improve deliverability and avoid spam filters.", }, { name: "Captcha & Security", free: crossIcon, pro: checkmarkLarge, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Enhanced security features including captcha protection to prevent spam and unauthorized access.", }, // Collapsed features { name: "List Unsubscribe", free: crossIcon, pro: checkmarkLarge, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Automated unsubscribe handling and list management to maintain clean subscriber lists.", }, { name: "Comment Optin", free: crossIcon, pro: checkmarkLarge, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Allow users to subscribe through comment opt-in forms on your website posts.", }, { name: "Send WooCommerce Coupons", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Integrate with WooCommerce to send discount coupons and promotional offers to subscribers.", }, { name: "Abandoned Cart Recovery Email", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Automatically send recovery emails to customers who abandon their shopping carts.", }, { name: "Post Digest Notifications", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Send automated digest emails with your latest blog posts and content updates.", }, { name: "Email Newsletter Archive", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Create and maintain an archive of all your sent newsletters for easy reference.", }, { name: "Resend Confirmation Email", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Automatically resend confirmation emails to subscribers who haven't confirmed their subscription.", }, { name: "Custom Contact Fields", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Create custom fields to collect additional subscriber information and segment your audience.", }, { name: "Autoresponder & Workflows", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Set up automated email sequences and workflows based on subscriber actions and triggers.", }, ]; const integrationsFeatures = [ { name: "Gmail API", free: crossIcon, pro: checkmarkLarge, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Integrate with Gmail API for enhanced email sending capabilities and better deliverability.", }, { name: "Automatic List Cleanup", free: crossIcon, pro: crossIcon, max: checkmarkLarge, icon: pricingInfoIcon, tooltipMsg: "Automatically clean and maintain your subscriber lists by removing invalid and bounced email addresses.", }, { name: "Membership Plugin Integration", free: crossIcon, pro: crossIcon, max: "Integrate with WooCommerce Memberships, MemberPress, Paid Memberships Pro, Ultimate Members.", icon: pricingInfoIcon, tooltipMsg: "Seamlessly integrate with popular membership plugins to sync subscriber data and automate communications.", }, { name: "Popular Integrations", free: crossIcon, pro: crossIcon, max: "Integrate with WooCommerce Abandoned Cart, Easy Digital Downloads, GiveWP Donation, Yith Wishlist Item On Sale, LearnDash, Contact Form 7, Ninja Forms, Forminator, Gravity Forms & WP Forms", icon: pricingInfoIcon, tooltipMsg: "Connect with popular WordPress plugins and third-party services to enhance your email marketing capabilities.", }, ]; const supportFeatures = [ { name: "Support", free: "WordPress Forum Support", pro: "Premium Support (Email)", max: "VIP Support (Email + Facebook)", icon: pricingInfoIcon, tooltipMsg: "Get dedicated support based on your plan level, from community forums to VIP priority support.", }, ]; return (
{/* Pricing Table Section - Feature Comparison */}
{/* Header - Left aligned as per Figma design */}

Upgrade your plan

Unlock premium features and take your experience to the next level

{/* Alert Message */}
Coupon

Congratulations you have unlocked 25% off on Icegram Express Premium plans

Redeem now to enjoy premium features, limited time offer!

{/* Header Row - Figma style */}

Plans

{/* Free Plan */}
Free

Free

Unlimited contacts, emails, forms & lists. Automatic welcome emails and new post notifications.

Current Your current plan
{/* Pro Plan - with black border around entire column */}
Pro
Pro
Everything in Free + Automatic batch sending, Captcha, Advanced blocks.
$ 129
Save 20%
$ 96.75 /year
{/* Most Popular Tag - positioned exactly as in Figma with proper z-index */}
Most Popular
{/* Max Plan */}
Max
Max
Everything in Pro + Integrations, List cleanup, Cart recovery emails, Autoresponders
$ 229
Save 31%
$ 171.75 /year
{/* Email Management Header Row */}
Email Management
{/* Feature Rows - show first 6, collapse rest */} {emailManagementFeatures.slice(0, 6).map((feature, index) => ( {/* Add separator line after 3rd Party SMTP Configuration */} {index === 1 && ( <>
)} {/* Add separator line after Detailed Reports/Analytics */} {index === 2 && ( <>
)} {/* Add separator lines for Weekly Summary Email onwards */} {index === 3 && ( <>
)} {/* Add separator line starting from Automatic Batch Sending (index 4) */} {index === 4 && ( <>
)} {/* Add separator line for Captcha & Security (index 5) */} {index === 5 && ( <>
)}
{feature.name} {feature.tooltipMsg ? (
{feature.tooltipMsg}
) : ( )}
= 1 && index <= 3) ? 'py-4 text-[14px]' : 'py-4'}`}>{feature.free}
= 1 && index <= 3) ? 'py-4 text-[14px]' : 'py-4'}`}> {feature.pro} {/* Add border overlay for Pro column */}
= 1 && index <= 3) ? 'py-4 text-[14px]' : 'py-4'}`}>{feature.max}
))} {/* Gradient Overlay - only show when not expanded to create fade effect */} {!showAll && (
)} {/* See All Features Text Link Row (spans all columns) - only show when not expanded */} {!showAll && (
setShowAll(true)} > See All Features Expand
)} {/* Collapsed sections: only visible when showAll is true */} {showAll && <> {/* Email Management - rest of features */} {emailManagementFeatures.slice(6).map((feature, index) => ( {/* Add separator line for each collapsed feature from start to Autoresponder & Workflows */} {index <= 8 && ( <>
)}
{feature.name} {feature.tooltipMsg ? (
{feature.tooltipMsg}
) : ( )}
{feature.free}
{feature.pro} {/* Add border overlay for Pro column */}
{feature.max}
))} {/* Integrations & APIs Header Row */}
Integrations & APIs
{/* Integrations & APIs Features */} {integrationsFeatures.map((feature, index) => ( {/* Add separator lines for Gmail API, Automatic List Cleanup, and Membership Plugin Integration */} {(index === 1 || index === 2 || index === 3) && ( <>
)}
{feature.name} {feature.tooltipMsg ? (
{feature.tooltipMsg}
) : ( )}
{feature.free}
{feature.pro} {/* Add border overlay for Pro column */}
{feature.max}
))} {/* Help & Support Header Row */}
Help & Support
{/* Help & Support Features */} {supportFeatures.map((feature, index) => (
{feature.name} {feature.tooltipMsg ? (
{feature.tooltipMsg}
) : ( )}
{feature.free}
{feature.pro} {/* Add border overlay for Pro column */}
{feature.max}
))} }
{/* Testimonials Section - always visible after pricing plans */}

Loved by thousands of customers

{/* Testimonial 1 */}
{[...Array(5)].map((_, i) => ( star ))}
Perfect plugin for blog promotion
“This plugin works great in WordPress. Simple, yet effective. When a new blog is released, it sends a customized email along with a link to the blog title. Great to stimulate web traffic, yet sends a simple email. Have been using for over 6 months.”
Resolve
Head of Product
{/* Testimonial 2 */}
{[...Array(5)].map((_, i) => ( star ))}
Great for Professional Bloggers
“Great for Professional Bloggers and great support! Icegram was very responsive to our questions. I highly recommend this WordPress plugin and the PAID version is worth the cost. The paid version shows intuitive stats and drill-down information.”
Rick Vidallon
Blogger
{/* Testimonial 3 - half visible */}
{[...Array(5)].map((_, i) => ( star ))}
Great for Professional Bloggers
“Easy setup and instant action. The best part? It actually delivers results! Unlike those big shots, it nails blog entry notifications. Plus, pair it with Icegram Collect for an even better form makeover!”
Lauren Devine
Artist
{/* Carousel Indicators - now outside keen-slider for visibility */}
{[0, 1, 2].map((idx) => (
instanceRef.current?.moveToIdx(idx)} /> ))}
{/* Trusted Team Section - Figma design */}
Trusted by world’s most innovative teams
Company Logo
Company Logo
Company Logo
Company Logo
Netdot
{/* Help & Support Section - Figma design */}
Help & support
{/* Contact Card */}
Contact Reach us out for any queries
Have questions for us, email us and our team of experts will get back to you within 24 hours
Email Email us
{/* FAQ Card */}
FAQ FAQ
Find solutions to your queries
{/* FAQ List */}
{[ { q: "What is Icegram, and how does it work?", }, { q: "Is Icegram free to use, or does it have premium plans?", }, { q: "How does Icegram compare to other lead generation and engagement tools?", }, { q: "Can I use Icegram on multiple websites?", }, { q: "Does Icegram slow down my website?", }, ].map((item, idx) => (
setOpenFaqIdx(openFaqIdx === idx ? null : idx)} > {item.q} {openFaqIdx === idx ? ( // Minus icon from Figma Collapse ) : ( // Plus icon from Figma Expand )}
{openFaqIdx === idx && (
Icegram is a powerful WordPress plugin that helps you create popups, opt-ins, call-to-actions, and notifications to engage website visitors and generate leads. It allows you to design and trigger different types of messages to increase conversions, reduce bounce rates, and enhance user interaction.
)} Divider
))}
); }