1.1.89 • Published 1 year ago

vue3-box-shadows v1.1.89

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Vue3 Box-shadows

A collection of simple and airy shadows for Vue.js v3 projects.


discord npm download GitHub issues

GitHub watchers GitHub forks GitHub stars

Note
You are reading the documentation for vue-box-shadows on Vue.js v3.
Documentation for vue-box-shadows for Vue.js v2 is here.

Download and Installation

$ npm i --save-dev vue3-box-shadows
# or yarn
$ yarn add --dev vue3-box-shadows

Usage

import { createApp } from "vue"
import App from "./App.vue"
import shadows from "vue3-box-shadows";

const app = createApp(App);

app.use(shadows);
app.mount('#app');

To create a basic shadow element with minimal configuration, write the following:

<template>
  <div v-box-shadow>
    Add beautiful shadow effects to your project without thinking about CSS.
    Properties are supported by all modern browsers.
  </div>
</template>

To use collection shadows, you need to apply id or short name-$ ($ is value) from the groups table.

<template>
  <!-- use name -->
  <div v-box-shadow:neu-2></div>

  <!-- or -->

  <!--  use id -->
  <div v-box-shadow="34"></div>
</template>

Groups

Examples of shadows can be seen in the table below. To work with shadows on your site, simply select a group that matches your site's style (elevation to example), select an ids or names, and you're done.

GroupIdNamesValuesExamples
None0none1---
Elevation1-24el-$1-24View
Borders25-30bd-$1-6View
Neumorphism31-39neu-$ or neu-$-i or neu-$-io1-3View
Axis x40-45ax-$1-6View
Axis y46-51ay-$1-6View
Small inner side52-55si-$1-4View
Medium inner side56-59mi-$1-4View
Large inner side60-63li-$1-4View
Top64-69t-$1-6View
Bottom70-75b-$1-6View
Right side76-81r-$1-6View
Left side82-87l-$1-6View
Angle: top left88-93tl-$1-6View
Angle: top right94-99tr-$1-6View
Angle: bottom right100-105br-$1-6View
Angle: bottom left106-111bl-$1-6View
Patterns112-115p-$1-2---

Options

OptionTypeDefaultDescription
useClassBooleanfalseSet to true in order to import styles into <head> automatically.
shadowBaseCustomString"0 2px 8px 0 rgb(50 50 50 / 8%)"Set a value for box-shadow to change the default property.
// ...
app.use(shadows, {
  useClass: false,
  shadowBaseCustom: "0 2px 8px 0 rgb(50 50 50 / 8%)",
});

License

Vue-box-shadows is licensed under the MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.


Installing · Usage · Groups · Options