added sliding effect to the component