Hi friends! I'm a first-time kobweb user. :slightl...
# kobweb
p
Hi friends! I'm a first-time kobweb user. 🙂 Sorry for the newbie question: we are porting our web system to kobweb and it currently uses Cirrus UI as CSS framework. Would it be possible to use it in kobweb? I couldn't find a reference on how to achieve that. Any pointers are appreciated. Thanks!
s
it would technically be possible, yes. but I'd argue that it defies the purpose of kobweb, as you usually don't work with raw html elements and classes, but a compose styled api. Have you had a look at example kobweb code? Many of cirrus' classes exist as
Modifier
s and parameters in kobweb.
gratitude thank you 1
also, cirrus itself and the example code looks awfully non best-practice. like having a button inside an
a
or having all css properties with
!important
🤔
gratitude thank you 1
but as an example
Copy code
<div class="u-flex u-justify-flex-end">
    <a href="<http://cirrus-ui.netlify.app/getting-started/setup>" target="_blank">
        <button class="btn-info outline">Read the Docs</button>
    </a>
</div>
would looks something like
Copy code
Row(horizontalArrangement = Arrangement.End) {
    Link("/path", "Read the Docs", variant = LinkButtonVariant)
}
in kobweb
gratitude thank you 1
p
Thanks so much for this! And good point, it's better to stick with the conventions and avoid mixing raw HTML/CSS elements. The sample is also very helpful, I have a lot of things to play during the weekend! 😁 gratitude thank you Cheers!
s
you're welcome. and yes, I would suggest playing around with kobweb itself first. I don't know how big Cirrus' library is, if there are requirements to use it and profit from kmp at the same time, it's possible. people have also used tailwind with kobweb.
gratitude thank you 1
👍 1
d
Thanks S. for answering! And Paulo, please feel welcome to ask newbie questions, that's what this channel is here for.
gratitude thank you 1
K 1