<div class="input-group">
<input type="text" value="https://codeshack.io/input-with-action-button/" readonly>
<button class="action-btn">
<span class="btn-text">Copy</span>
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
</button>
</div>
Back to Snippets
Input with Action Button
Save space and improve UX by placing action buttons inside the input field. This is perfect for "Copy Link" or "Subscribe" actions, keeping the interface clean and cohesive.
483