@ayase/vc-align

0.0.5 • Public • Published

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

Prop Description Type Default
align same with alignConfig from dom-align Object -
target a function which returned value or point is used for target from dom-align () => HTMLElement | { pageX: number, pageY: number } | { clientX: number, clientY: number } () => window
monitorWindowResize whether realign when window is resized boolean false

License

MIT

Dependents (1)

Package Sidebar

Install

npm i @ayase/vc-align

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

34.7 kB

Total Files

17

Last publish

Collaborators

  • peckzeg