Use classNameBindings to set the value of the default class and have it bound to your rendered component element.
You can still override the value of the default class by assigning a new value to the property optionalClass via the template.
// my-classy-component.js
import Ember from 'ember';
export default Ember.Component.extend({
classNameBindings: ['optionalClass'],
optionalClass: 'vader-black',
});
// this will be rendered with class 'vader-black' on the div
{{my-classy-component}}
// this will be rendered with class 'threepio-gold' on the div
{{my-classy-component optionalClass='threepio-gold'}}