htmlbeginnermit
Icon Button
A button with an arrow icon that slides on hover.
2.3k486636146
About this module
A button with a trailing arrow icon that slides outward on hover. A classic CTA pattern for landing pages.
#button#ui#icon#arrow#cta
Source code
Installation
- 1
Create the files
Create `index.html`, `style.css` and (if listed) `script.js` in the same folder.
- 2
Paste the code
Copy each file's source into its matching file.
- 3
Open in the browser
Open `index.html` in any modern browser. No build step or dependencies are required.
Usage
- 1
Copy the HTML
Paste the button markup where you need it.
<link rel="stylesheet" href="style.css" /> <button class="mh-btn-icon"> <svg class="mh-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg> <span class="mh-label">Get Started</span> </button>