You can use the lv_obj_set_user_data(slider, custom_slider_dsc) the user data type can be set in lv_conf.h as lv_obj_user_data_t (the default void* could work for you)
Or a more professional way it to add custom data to the slider’s extended data. See this post.