1.0.0 • Published 9 months ago

luna-box-model v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Luna Box Model

Css box model metrics.

Demo

https://luna.liriliri.io/?path=/story/box-model

Install

Add the following script and style to your page.

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-box-model/luna-box-model.css" />
<script src="//cdn.jsdelivr.net/npm/luna-box-model/luna-box-model.js"></script>

You can also get it on npm.

npm install luna-box-model --save
import 'luna-box-model/luna-box-model.css'
import LunaBoxModel from 'luna-box-model'

Usage

const boxModel = new LunaBoxModel(container)
boxModel.setOption('element', document.getElementById('target'))

Configuration

  • element(HTMLElement): Target element.
1.0.0

9 months ago

0.1.0

2 years ago