Skip to content

A Vue component, which solves the 100vh problem in mobile browsers, fork from React component

License

Notifications You must be signed in to change notification settings

razumnyak/vue-div-100vh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue100vh Vue component

npm version

This is a workaround for iOS Safari and other mobile browsers.

Forked from react-div-100vh by mvasin.

ViewDemo vue-100vh

Add in your Vue project

npm i vue-100vh

The default behavior

<template>
  <vue100vh :css="{height: '100rvh';}">
    <marquee>Your stuff goes here</marquee>
  </vue100vh>
</template>

<script>
import vue100vh from 'vue-100vh'

export default {
  components: { vue100vh },
}
</script>

Using rvh units

  <vue100vh :style="{ minHeight: '50rvh' }">
    <marquee>This is inside a div that takes at least 50% of viewport height.</marquee>
  </vue100vh>

About

A Vue component, which solves the 100vh problem in mobile browsers, fork from React component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published