craigh411 / vue-star-rating

:star: A simple, highly customisable star rating component for Vue 2.x. / 3.x
https://jsfiddle.net/craig_h_411/992o7cq5/
MIT License
659 stars 87 forks source link

Responsive #28

Open ARusov opened 6 years ago

ARusov commented 6 years ago

Hi, Nice component But I did app for desktop and mobile. I can not use this component on mobile. It is not responsive

craigh411 commented 6 years ago

You should be able to change the star size based on the screen size yourself. I will take a look to see if I can do something to make this responsive, however, it's slightly tricky because the size of each star is passed to SVG's width attribute which doesn't behave like a normal page element, so I would still probably need to allow some way to pass user defined break points and sizes.

selaromdotnet commented 6 years ago

built in responsive abilities would be slick, but in a pinch, you can use bootstrap to show/hide two instances based on device sizing:

            <div class="d-none d-sm-none d-md-block">
                <star-rating :max-rating="10" :increment="0.1" :rating="vote_average"  :star-size="50"></star-rating>
            </div>
            <div class="d-md-none">
                <star-rating :max-rating="10" :increment="0.1" :rating="vote_average" :star-size="25"></star-rating>
            </div>

hope this helps, and thanks for your work and sharing this great component!

kosmeln commented 4 years ago

When is the expected release date for this feature?