Giter VIP home page Giter VIP logo

glue's Introduction

Glue for Vue

npm (scoped)

Glue Vue is a minimal Vue component library that uses Tailwindcss classes for customisation.

Installation

Install the npm package:

npm install @garethfuller/glue
# or with yarn
yarn add @garethfuller/glue

Add it as a plugin in your Vue project, e.g. create a file like glue.js in your plugins folder and add the following to it's contents:

// plugins/glue.js
import Vue from 'vue'
import Glue from '@garethfuller/glue'

Vue.use(Glue)

Import this plugin in your app's build step/file.

Dependencies

Required

Tailwindcss - Glue Vue expects that your project has Tailwind installed. The components then use the Tailwind classes provided by your Tailwind configuration.

For example, using the g-btn component:

<g-btn color="red">Hello World</g-btn>

This will use your Tailwind colour class for bg-red-500 as the background colour for the button, and variant classes for hover/active states.

Optional

There are two optional dependencies, Fontawesome and highlight.js, which are used in specific components.

The g-icon component takes a name prop and applies that as a class to an underlying <i :class="'icon ${name}" /> element. The purpose is such that if you have Fontawesome installed in your app you can use the component like this:

<g-icon name="fas fa-user-circle" />

Please see GIcon.vue for more information.

The g-code component makes use of highlight.js (if installed in your app) to syntax highlight any code that is passed into the component. Please see GCode.vue for more information.

Components

Development

yarn install

Compiles and hot-reloads for development

yarn run dev

Compiles and minifies for production

yarn run build

glue's People

Contributors

garethfuller avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.