<Work in progress>
Proposal for proper CSS support can be found here: yewstack/yew#533
In the meantime you can define the style with any standard CSS tools
So far Yew component does not support natively the class
attribute. You can add the class attribute to your component:
#[derive(Properties, Clone, PartialEq)]
...
pub struct Props{
...
#[prop_or_default]
pub class:String,
...
}
...
and render how you wish!
...
html! {
<div class={format!("{}",self.props.class)}>
<h1>{"I am super Class"}</h1>
</div>
}
...