I'm attempting to dynamically apply a css class using a property. For 
example I want to pass in a string:

<my-button kind="primary">some stuff</my-button>

My component looks like so: 

class MyButton extends LitElement {
static get properties() {
return {
kind: String

constructor() {

render({ kind }) {
return html`
.primary {
color: red;
<button on-click="${() => console.log('working')}" 
Press Me! 

When I hard-code the class on the element it works. Any ideas? 


Follow Polymer on Google+: plus.google.com/107187849809354688692
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to