Wondering what’s next for npm?Check out our public roadmap! »

    v-object-fit

    1.0.5 • Public • Published

    v-object-fit directive

    Usage

    npm install v-object-fit yarn add v-object-fit
    import Vue from 'vue';
    import vObjectFit from 'v-object-fit';
    Vue.directive('object-fit', vObjectFit);
    <img src="https://picsum.photos/536/354" alt="Image Alt" title="Image Title" v-object-fit>

    Options

    By default object-fit will be cover, if you want to use other options, you can do it like this:

    <img src="https://picsum.photos/536/354" alt="..." title="..." v-object-fit="contain">

    Install

    npm i v-object-fit

    DownloadsWeekly Downloads

    100

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    1.88 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar