This illustrator tutorial shows how to create sliced text effect. Since the effect is live, the text is editable. The effect works for a single line. it can be saved to styles panel and used for other text. Although video demonstrates the effect for only single color, you can use different colors and gradients for your individual project.
How to create live sliced text effect in illustrator