Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

yuche's avatar

VueStrap - Bootstrap components built with pure Vue.js.

0 likes
44 replies
bobbybouwmann's avatar

Awesome stuff! I think this is really helpful for a lot of artisan here ;)

bugsysha's avatar

Great job. Like Cartman would say: "Kewl" :)

sunny's avatar

@yuche please, add component support for uploading single or multiple files.

ably's avatar

Awesome! Thanks for sharing it :) @yuche would be great if you add some kind of a range slider

mstnorris's avatar

@yuche I'm using gulp and pulling in due-strap through npm, yet v-select isn't rendering.

<v-select multiple name="permissions" id="permissions-select">
        @foreach ( $permissions as $id => $name )
            <v-option value="{{ $id }}">{{ $name }}</v-option>
        @endforeach
    </v-select>

VueStrap is compiled using npm and gulp and included within my master page. The code below is below the <script> tag as it should be.

<script>
    var select = VueStrap.select
</script>
yuche's avatar

Thank you all, guys.

@sunny Bootstrap currently don't have a file upload components. I will do some research about it.

@ably Yeah, there will be a range slider component.

@mstnorris Did you get any errors in browser console?

mstnorris's avatar

@yuche I didn't get any errors when I used the code shown above, it just didn't render properly and instead displayed an inline list.

When I used the Common JS code you provided I got a "reference error can't find variable require".

DirkZz's avatar

Awesome! Will definitely give this a try tomorrow, thanks for sharing!

yuche's avatar

@mstnorris In order to use Select component, You should import two components. For example, In CommonJS way:

var select = require('vue-strap/src/Select.vue');
var option = require('vue-strap/src/Option.vue');

new Vue({
    components: {
        'v-select': select,
        'v-option': option
    }
})
ably's avatar

I just wanted to try the code you pasted above (coz I had some problems with Aside):

Saving To...
   - public/js/app.js

[00:22:45] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token

(...)/node_modules/vue-strap/src/Select.vue:1
<template>
^
ParseError: Unexpected token

```
ably's avatar

when I try this with aside:

var aside = require('vue-strap/src/Aside.vue');

I have an error like this (I think it's related with this from above)

Browserify Failed!: Parsing file (...)/node_modules/vue-strap/src/Aside.vue: Unexpected token (1:0)
1 like
yuche's avatar

@ably I'am adding Browserify support for VueStrap, Just wait for a little bit longer. :)

5 likes
Minahgo's avatar

Does not work for me either the global browser way. Things aren't rendered with no errors in the console.

Minahgo's avatar

Thanks @yuche ! Now it works. You might want to add that example to your docs for people like me who never used Vue before! Great Job btw!

fercho's avatar

@yuche , can you explain how to use Modals? with your example in http://yuche.github.io/vue-strap/#modal I cant make it pop .

var modal = VueStrap.modal
new Vue({
    el:'#ordertbl',
    components: {
      'modal':modal
    },
<button class="btn btn-default btn-lg"  v-on="click:showModal = true"  >Show modal </button>
                <modal title="Modal" show="{{@showModal}}" effect="fade" width="400">
                ....
                </modal>
1 like
Next

Please or to participate in this conversation.