Let $A$ and $B$ be two points lying on the parabola $y^2 = 4x$ in the first quadrant.  The circle with diameter $\overline{AB}$ has radius $r,$ and is tangent to the $x$-axis.  Find the slope of line $AB$ in terms of $r.$

[asy]
unitsize(0.4 cm);

path parab = (16,-8);
real y;
pair A, B, O;
real a, b, r;

a = (10 + 2*sqrt(5))/5;
b = (10 - 2*sqrt(5))/5;
A = (a^2,2*a);
B = (b^2,2*b);
O = (A + B)/2;
r = a + b;

for (y = -8; y <= 8; y = y + 0.2) {
  parab = parab--(y^2/4,y);
}

draw(parab,red);
draw((-2,0)--(16,0));
draw((0,-8)--(0,8));
draw(Circle(O,r));
draw(A--B);

dot("$A$", A, N);
dot("$B$", B, W);
[/asy]
Since $A$ and $B$ lie on the graph of $y^2 = 4x$ in the first quadrant, we can let $A = (a^2,2a)$ and $B = (b^2,2b),$ where $a$ and $b$ are positive.  Then the center of the circle is the midpoint of $\overline{AB},$ or
\[\left( \frac{a^2 + b^2}{2}, a + b \right).\][asy]
unitsize(0.4 cm);

path parab = (16,-8);
real y;
pair A, B, O;
real a, b, r;

a = (10 + 2*sqrt(5))/5;
b = (10 - 2*sqrt(5))/5;
A = (a^2,2*a);
B = (b^2,2*b);
O = (A + B)/2;
r = a + b;

for (y = -8; y <= 8; y = y + 0.2) {
  parab = parab--(y^2/4,y);
}

draw(parab,red);
draw((-2,0)--(16,0));
draw((0,-8)--(0,8));
draw(Circle(O,r));
draw(A--B);
draw(O--(O.x,0),dashed);

dot("$A$", A, N);
dot("$B$", B, W);
dot(O);
label("$(\frac{a^2 + b^2}{2}, a + b)$", O, NW, UnFill);
dot((O.x,0));
[/asy]

Since the circle is tangent to the $x$-axis, the radius of the circle is $r = a + b.$

The slope of line $AB$ is then
\[\frac{2a - 2b}{a^2 - b^2} = \frac{2(a - b)}{(a + b)(a - b)} = \frac{2}{a + b} = \boxed{\frac{2}{r}}.\]