Converts the group into a custom directive.