Shareholder Agreement Generator

Shareholder Agreement Generator

Create a customized shareholder agreement for your corporation.

Company & Shareholder Information

Initial Shareholders

Capital and Shares

Governance and Management

Share Transfers and Restrictions

Review & Generate Agreement

Please review the generated agreement below. If you need to make changes, navigate back to the relevant tabs. When ready, click the download button to get your PDF.

Your generated agreement will appear here after you navigate to this tab.

${rofr}

Mandatory Buy-Sell Triggers: Upon the occurrence of any of the following events, the buy-sell provisions of this agreement shall be triggered:

${buySell}

5. General Provisions

Governing Law: This Agreement shall be governed by and construed in accordance with the laws of the State of ${incorporationState}.

Entire Agreement: This Agreement constitutes the entire agreement among the parties and supersedes any prior understandings, agreements, or representations by or among the parties, written or oral.



IN WITNESS WHEREOF, the parties have executed this Agreement as of the date first above written.

`; }; /** * Adds a new shareholder input group to the form. */ const addShareholder = () => { const shareholderCount = document.querySelectorAll('.shareholder-entry').length; const newShareholderEntry = document.createElement('div'); newShareholderEntry.className = 'shareholder-entry grid grid-cols-1 md:grid-cols-12 gap-4 border p-4 rounded-lg mb-4'; newShareholderEntry.innerHTML = `
`; shareholdersContainer.appendChild(newShareholderEntry); updateRemoveButtons(); }; /** * Shows or hides the remove shareholder buttons based on the count. */ const updateRemoveButtons = () => { const removeButtons = document.querySelectorAll('.remove-shareholder-btn'); if (removeButtons.length > 1) { removeButtons.forEach(btn => btn.classList.remove('hidden')); } else { removeButtons.forEach(btn => btn.classList.add('hidden')); } }; /** * Downloads the generated agreement as a PDF file with proper page wrapping. */ const downloadPDF = async () => { const { jsPDF } = window.jspdf; const content = document.getElementById('pdf-output'); const downloadButton = document.getElementById('pdf-download-btn'); const originalButtonText = downloadButton.innerHTML; downloadButton.innerHTML = 'Generating PDF...'; downloadButton.disabled = true; try { const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'a4' }); await pdf.html(content, { margin: [40, 40, 40, 40], // top, right, bottom, left autoPaging: 'text', width: 515, // A4 width (595pt) - margins (40pt * 2) windowWidth: 650, html2canvas: { scale: 0.8, useCORS: true, logging: false } }); const companyName = getValue('companyName', 'Company').replace(/[^a-z0-9]/gi, '_').toLowerCase(); pdf.save(`${companyName}_shareholder_agreement.pdf`); } catch (error) { console.error("Error generating PDF:", error); // No alert() per specifications. Error is logged to the console. } finally { downloadButton.innerHTML = originalButtonText; downloadButton.disabled = false; } }; // --- Event Listeners --- tabs.forEach(tab => { tab.addEventListener('click', () => { const tabNumber = parseInt(tab.dataset.tab); showTab(tabNumber); }); }); nextBtn.addEventListener('click', () => { if (currentTab < totalTabs) { showTab(currentTab + 1); } }); prevBtn.addEventListener('click', () => { if (currentTab > 1) { showTab(currentTab - 1); } }); if(addShareholderBtn) { addShareholderBtn.addEventListener('click', addShareholder); } if(downloadPdfBtn) { downloadPdfBtn.addEventListener('click', downloadPDF); } // Event delegation for dynamically added remove buttons shareholdersContainer.addEventListener('click', (e) => { if (e.target && e.target.classList.contains('remove-shareholder-btn')) { e.target.closest('.shareholder-entry').remove(); updateRemoveButtons(); } }); // --- Initial Setup --- showTab(1); // Initialize the view to the first tab updateRemoveButtons(); });
Scroll to Top