The sliding player must make contact with the ball before touching the other player, otherwise it's a foul.
If it was unintentional, then a yellow card makes sense. If it was intentional, then definitely a red card.
Of course it also depends on the context. If this player had been warned about aggressive tackling, or already had a yellow card, then a red card might be warranted.
A player, substitute or substituted player who commits any of the following offences is sent off:
denying the opposing team a goal or an obvious goal-scoring opportunity by a handball offence (except a goalkeeper within their penalty area)
denying a goal or an obvious goal-scoring opportunity to an opponent whose overall movement is towards the offender’s goal by an offence punishable by a free kick (unless as outlined below)
serious foul play
biting or spitting at someone
violent conduct
using offensive, insulting or abusive language and/or action(s)
receiving a second caution in the same match
entering the video operation room (VOR)
Serious foul play
A tackle or challenge that endangers the safety of an opponent or uses excessive force or brutality must be sanctioned as serious foul play.
Any player who lunges at an opponent in challenging for the ball from the front, from the side or from behind using one or both legs, with excessive force or endangers the safety of an opponent is guilty of serious foul play.