use mg-class to attach a dynamic class