Ghost Button

Minimal visual button.

html

<button type="button" class="btn-ghost btn-ghost--underline" style="--bg:#241430;border-radius:10px">Learn more</button>
<style>
.btn-ghost {
  font: 600 15px/1 system-ui, sans-serif;
  padding: 11px 18px;
  border: none;
  background: transparent;
  color: var(--bg);
  cursor: pointer;
}
.btn-ghost:hover:not(:disabled) { background: rgba(36,20,48,.06); }
.btn-ghost--underline:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.btn-ghost:focus-visible { outline:2px solid #241430;outline-offset:2px; }
.btn-ghost:disabled { opacity: .4; cursor: not-allowed; }
</style>

tailwind

<button type="button" class="px-4.5 py-2.75 text-sm font-semibold bg-transparent border-none cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed hover:bg-black/[.06] btn-ghost-tw btn-ghost-tw--underline" style="color:#241430;border-radius:10px">Learn more</button>
<style>
.btn-ghost-tw--underline:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.btn-ghost-tw:focus-visible { outline:2px solid #241430;outline-offset:2px; }
</style>

react

export function GhostButton({
  label = "Learn more",
  bg = "#241430",
  radius = 10,
  underline = true,
  disabled = false,
}) {
  return (
    <button
      type="button"
      disabled={disabled}
      className={underline ? "ghost-underline" : ""}
      style={{
        padding: "11px 18px",
        borderRadius: radius,
        border: "none",
        background: "transparent",
        color: bg,
        font: "600 15px/1 system-ui, sans-serif",
        cursor: disabled ? "not-allowed" : "pointer",
        opacity: disabled ? 0.4 : 1,
      }}
    >
      {label}
    </button>
  );
}