coreui / coreui-free-vue-admin-template

Open source admin template based on Bootstrap 5 and Vue 3
https://coreui.io/product/free-vue-admin-template/
MIT License
3.28k stars 963 forks source link

Why not HTML? #219

Closed geri777 closed 4 years ago

geri777 commented 4 years ago

I have already used earlier versions of CoreUI. Now I come back and see that you have replaced nearly all HTML Tags with directives like CRow, CCol, CCard, CTable, CTableWrapper, etc.

To a certain degree I understand this abstraction. But for anyone not dedicating his life to CoreUi so much like you guys this is just a pain.

For example:

INPUT:

<CRow>
    <CCol col>
        <CCard>

OUTPUT:

<div class="row">
    <div class="col">
        <div class="card">

So instead of using some CSS classes which are common anyway (Bootstrap 4) I have to learn some CoreUI Tag Syntax. Maybe I just don't get the point. It would be easier for me to become familiar with this syntax if I understood its idea / purpose.

woothu commented 4 years ago

Using the components is fully optional. The template is only showing examples of usage of our components in the component based approach.

As you said the main disadvantage of this approach is for someone who knows bootstrap CSS already and has to learn our components, though it is not so hard because component names often are very similar to bootstrap classes.

In the case of stateful and complex components, it is natural to use components, but I understand that your concern is about wrapper components, which have no additional logic. (like CRow)

Advantages of this approach in simple components:

geri777 commented 4 years ago

Thank you very much for your helpful explanation. I think I will use the native HTML whenever possible, because it's easier to see what's happening under the hood.

With Bootstrap: html+css = result

With CoreUI elements: Celement+[HTML generated]+[CSS fixes maybe]+[JS fixes maybe] = display

But who knows - I consider myself as a beginner with this great UI - so the way of working with it might change as time goes by. Thank you very much for this awesome ui/template.