vue-star-rating icon indicating copy to clipboard operation
vue-star-rating copied to clipboard

Responsive

Open ARusov opened this issue 6 years ago • 3 comments

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

ARusov avatar Mar 11 '18 08:03 ARusov

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.

craigh411 avatar Mar 15 '18 15:03 craigh411

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!

selaromdotnet avatar Apr 10 '18 05:04 selaromdotnet

When is the expected release date for this feature?

kosmeln avatar Nov 04 '20 12:11 kosmeln