create a function of creating a carousel

Signed-off-by: scauwjh <scauwjh@gmail.com>