f[x_]=Sin[x]

x1=0

x2=1

a[x1_,x2_]=(f[x1]-f[x2])/(x1-x2)

b[x1_,x2_]=(x1*f[x2]-x2*f[x1])/(x1-x2)

t[a_,b_,t_]=a*t+b

Manipulate[Plot[{f[x],t[a[x1,x2],b[x1,x2],x],t[a[x1,x2],b[x1,x2],x]+k},{x,x1,x2}],{k,0,Abs[x2-x1]}]