scrollToId
Smoothly scroll to an element by its ID.
#browser
#scroll
#dom
#utility
export const scrollToId = (id: string) => { const el = document.getElementById(id); if (!el) return; el.scrollIntoView({ behavior: 'smooth', block: 'start' });};
// UsagescrollToId('section-2');