0.0.5 • Published 3 years ago

@ayase/vc-align v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

vc-align

Vue 3 Align Component. Wrapper around https://github.com/yiminghe/dom-align.

NPM version David dm node version

rc-align for vue 3

Install

vc-align

Usage

<template>
  <Align :align="{ points: ['cc', 'cc'] }" :target="() => document.body">
    <div />
  </Align>
</template>

<script>
import Align from '@ayase/vc-align';

export default {
  components: { Align }
};
</script>

API

Props

PropDescriptionTypeDefault
alignsame with alignConfig from dom-alignObject-
targeta function which returned value or point is used for target from dom-align() => HTMLElement \| { pageX: number, pageY: number } \| { clientX: number, clientY: number }() => window
monitorWindowResizewhether realign when window is resizedbooleanfalse

License

MIT