-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
Utshab Luitel edited this page Sep 1, 2025
·
3 revisions
Welcome to Mailyon! This guide will help you get up and running quickly with the email template builder.
Before you start, make sure you have:
- Node.js 16 or higher
- React project (version 16.8 or higher)
- npm or yarn package manager
npm install mailyon
npm install react-dnd react-dnd-html5-backend
import { EmailTemplateBuilder } from 'mailyon';
function MyApp() {
return (
<div style={{ height: '100vh' }}>
<EmailTemplateBuilder />
</div>
);
}
That's it! You now have a fully functional email template builder.
- Drag components from the left panel to the center canvas
- 8 components available: Header, Text, Image, Button, Divider, Footer, Spacer, Social Media
- Click any component to select it
- Use the Inspector panel on the right to customize
- See changes instantly in the preview
- Use the tabs at the top: Editor, Desktop, Mobile
- Test responsiveness by switching between views
- Make adjustments as needed
- Click the Export tab in the right panel
- Copy the code or download files
- Get HTML, MJML, or JSON formats
- Header - Add logo, company name, tagline
- Text - Write paragraphs and headings
- Image - Add photos and graphics
- Button - Create call-to-action buttons
- Divider - Add horizontal lines
- Footer - Add contact info and social links
- Spacer - Add vertical spacing
- Social Media - Add social platform icons
- Drag & Drop components here
- Real-time preview of your email
- Responsive design testing
- Component selection and editing
- Template Settings - Global email settings
- Component Properties - Customize selected component
- Export Options - Get your email code
- Email Width - Set the overall width (default: 700px)
- Background Color - Choose email background color
- Font Family - Select font for your email
Each component has different customization options:
- Colors - Background, text, border colors
- Text Content - Edit text directly
- Sizing - Width, height, padding
- Alignment - Left, center, right
- Visibility - Show/hide elements
- Full-width view of your email
- Desktop email client appearance
- Perfect for most email clients
- Mobile-optimized view
- Responsive layout testing
- Mobile email client appearance
- JSON - Save your template structure
- MJML - Get MJML markup
- HTML - Get final HTML code
- Save templates for reuse
- Load existing templates
- Share templates with your team
import { useEmailTemplateBuilder, useEmailExport } from 'mailyon';
function MyApp() {
const { template, addComponent } = useEmailTemplateBuilder();
const { exportAsHTML } = useEmailExport();
const handleSave = () => {
const html = exportAsHTML();
// Save or send your email
};
return <EmailTemplateBuilder />;
}
<EmailTemplateBuilder
className="my-custom-class"
style={{ height: '800px' }}
/>
Components not dragging?
- Make sure you have
react-dnd
andreact-dnd-html5-backend
installed - Check that your React version is 16.8 or higher
Styling issues?
- The builder uses Tailwind CSS classes
- Make sure Tailwind is available in your project
Export not working?
- Check browser console for errors
- Make sure all components have valid properties
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
- Try the live demo at utdevnp.github.io/mailyon
- Read the Components guide to learn about each component
- Check out Examples for real-world use cases
- Explore Hooks for advanced integration
- GitHub Issues - Report bugs or request features
- Documentation - Browse the wiki for detailed guides
- Live Demo - Try it out before integrating
Happy building! π
- Home - Quick start and overview
- Getting Started - Installation and setup
- Components - Available email components
- Hooks - Custom React hooks
- Examples - Code examples and use cases
- Documentation Issues: Create an issue in the main repository
- Feature Requests: Use the GitHub Issues page
- Bug Reports: Include steps to reproduce and expected behavior
Built with β€οΈ using React, TypeScript, and Tailwind CSS
Email Template Builder - Professional email templates without the generic header!