This paper presents a design for an integrated optical wavefront sensor. Light from an aperture is focussed by a lens onto a detector array. The resulting signals can be used to determine the amount of angular tilt of the wavefront. Parameters affecting angular resolution are analyzed. Tilt angles as small as 10-5 rad are detectable. The effect of wavefront curvature is also discussed.