Why would you want to use the Renderer or Renderer2 class? The preferred way to do this in a directive is to use the @HostBinding decorator.
Example:
import { HostBinding } from '@angular/core';
@Directive({
selector: '[myDirective]'
})
export class MyDirective {
@HostBinding('class')
className = 'my-directive-css-class';
}