All Projects → mitevpi → vuetify-component-lib-template

mitevpi / vuetify-component-lib-template

Licence: MIT License
Template for creating a component library/design system using Vue.js and Vuetify.js.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to vuetify-component-lib-template

vuetify-with-storybook
Setting up Storybook with Vuetify the right way
Stars: ✭ 116 (+231.43%)
Mutual labels:  storybook, vuetify
orfium-ictinus
This repo will include the building blocks to create the Orfium Parthenons to come ...
Stars: ✭ 20 (-42.86%)
Mutual labels:  storybook, design-system
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+142.86%)
Mutual labels:  storybook, design-system
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (+234.29%)
Mutual labels:  material, vuetify
mod-uk-design-system
Build web applications that meet the Defence Digital service standards
Stars: ✭ 78 (+122.86%)
Mutual labels:  storybook, design-system
Vuetify Todo Pwa
✔️ A simple Todo PWA built with Vue CLI 3 + Vuex + Vuetify.
Stars: ✭ 160 (+357.14%)
Mutual labels:  material, vuetify
ui-kit
D2iQ UI Kit
Stars: ✭ 29 (-17.14%)
Mutual labels:  storybook, design-system
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+2437.14%)
Mutual labels:  material, design-system
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+288.57%)
Mutual labels:  storybook, design-system
Stardust
🎨Tiller Design System
Stars: ✭ 19 (-45.71%)
Mutual labels:  storybook, design-system
Material Storybook
Material Demos using Storybook
Stars: ✭ 72 (+105.71%)
Mutual labels:  material, storybook
smores-react
🍭 Marshmallow React components
Stars: ✭ 34 (-2.86%)
Mutual labels:  storybook, design-system
Vuetify Material Dashboard
Vuetify Material Dashboard - Open Source Material Design Admin
Stars: ✭ 1,023 (+2822.86%)
Mutual labels:  material, vuetify
Vuetify Daterange Picker
The missing date range picker for Vuetify JS you have been looking for.
Stars: ✭ 192 (+448.57%)
Mutual labels:  material, vuetify
Vuetify
🐉 Material Component Framework for Vue
Stars: ✭ 33,085 (+94428.57%)
Mutual labels:  material, vuetify
react-uswds
USWDS 3.0 components built in React
Stars: ✭ 108 (+208.57%)
Mutual labels:  storybook, design-system
material-vue
💎 Vue Material Template - Vuetify admin dashboard template built with Vuetify and Love 💝
Stars: ✭ 93 (+165.71%)
Mutual labels:  material, vuetify
Laravel Starter Kit
Laravel 7.0~ Starter Kit Powered by VueJS + Material Design(Vuetify)
Stars: ✭ 281 (+702.86%)
Mutual labels:  material, vuetify
cuida
A design system built by Sysvale, using storybook and Vue components
Stars: ✭ 16 (-54.29%)
Mutual labels:  storybook, design-system
pebble
Pebble Design System
Stars: ✭ 14 (-60%)
Mutual labels:  storybook, design-system

Vue.js Vuetify.js Storybook

Vue.js + Vuetify.js Component Library Template

GitHub issues GitHub pull requests GitHub contributors

GitHub last commit GitHub Release Date

GitHub code size in bytes GitHub repo size GitHub

A Design System / Component Library Template for enabling graphic consistency and legibility across web development projects by creating reusable components and styles with accessible & legible documentation. Built on top of Vue.js and Vuetify.js.

Usage

This Template is comprised of two major categories: Styles and Components. It builds to compiled components (.js) and compiled styles (.css) from the source (.vue) files which can be used across web applications. It also creates a Storybook site for component/design system documentation.

Clone this repository locally, and use it as a starting point for building a component library / design system on top of Vue.js and Vuetify.js

Added/Updated Configurations to Vue CLI Starter

  1. AirBnB Style Guide
  2. Prettier Style Guide
  3. ESLint (Style Enforcing)
  4. Storybook
  5. Library Build
  6. SCSS/SASS
  7. Vuetify.js

Key Commands

After cloning/downloading the repository locally, install the required dependencies using npm i. After installation, the following commands can be used to develop & build the component library.

  1. npm run build:all - This will build the component library in the dist folder, the preview app in the dist-app folder, and the static storybook site for documenting the components in the storybook-static folder.
  2. npm run storybook - Runs a local instance of Storybook, allowing you to preview/interact with your component documentation.
  3. npm run serve - Runs the preview app.

How to Import (The Built Library)

Importing Components

Global

Importing the single file .vue components directly. (If using Vue CLI 3 with Babel or TypeScript, it's recommended that you import its src directory. This will minimize the size of your application by preventing duplicate or unnecessary polyfills.)

Importing the source .vue file:

// main.js
import HelloWorld from "component-library/src/components";
Vue.use(HelloWorld);

Importing the bundled .js:

// main.js
import HelloWorld from "component-library";
Vue.use(HelloWorld);

In-Component Import

For single use in a component or small set of components.

Importing the source .vue file:

// component.vue
import HelloWorld from "component-library/src/components/HelloWorld";

export default {
  name: "Tester",
  components: {
    HelloWorld,
    Footer: () => import("component-library/src/components/Footer"),
  }
}
</script>

Importing the bundled .js components individually.

// component.vue
import { HelloWorld } from "component-library";

export default {
  name: "Tester",
  components: {
    HelloWorld
  }
}
</script>

Importing Styles

Loading Compiled CSS

The styles are written in SCSS and can be compiled upon building this library. They can be loaded into an application that doesn't have SCSS loading capability by referencing/importing the component-library.css file which is created in the dist folder of this repository when executing npm run build.

In order to enable this functionality, an edit has to be made in vue.config.js. The line extract: false must be removed or set to true, so that the compiled .css file(s) are created upon build.

import "component-library/dist/component-library.css";

Loading SCSS Directly

In order to import and use styles across Vue.js applications, the application will need to have sass, node-sass, and sass-loader installed as dev dependencies. Once installed, the style files may be imported using the syntax below.

// import in vue.js style section
@import "./styles/colors.scss";
@import "./styles/font.scss";
@import "./styles/typography-screen";

After importing, styles may be applied through classes, or through referencing the variables exported by the SASS.

/* importing variables in css */
#nav a {
  @extend .font-bold;
  color: $navy-blue;
}
#nav a.router-link-exact-active {
  color: $blue;
}
<!-- using classes directly in html -->
<h1 class="typography-page-head-sm">Page Head SM</h1>
<h1 class="typography-page-head-lg">Page Head LG</h1>

Design System

The structure of this project and component library are meant to emulate a larger-scale Design System (such as Google's Material).

Colors

Colors are referenced into components from the styles folder.

Icons

The icons are FontAwesome 5, and are loaded in using Vuetify.js & @fortawesome/fontawesome-free

Components

Components can be found in the src/components folder in the root directory of this repository.

Typography & Font

Typography & Font classes can be found under the src/styles folder. Currently, font.scss and typography-screen.scss are available for font & typography styling.

Developer Documentation

Building

In order to contribute to this project, fork/clone this repository locally. After cloning is completed, install the dependencies using npm i.

Preview

You can start a development server by running the commands below in the root directory of this repository. Once the development server is running, view localhost:8080 using Chrome and Vue.js Dev Tools. This is a preview application and will allow you to visualize the components/styles that will ultimately be compiled to the design system library.

npm run serve

or run the Storybook instance instead of the preview app

npm run storybook

Library

To build the project as a library, run npm run build in the root directory of the repository.

Commands

The following commands are used to develop the project:

  1. npm run build - Build the package distribution bundle.
  2. npm run build:app - Build the preview web application.
  3. npm run build:all - Build the preview application, distribution bundles, and the Storybook static site.
  4. npm run serve - Start a development server with live-reloading on changes. (Used for previewing individual components.)
  5. npm run lint - Lint code using ESLint and Vue, AirBnB, and Prettier configs.
  6. npm test - Run unit tests for the individual components in the package.
  7. npm run release - Runs tests, build, and version incrementing procedures.
  8. npm run storybook - Run Storybook to see the component library in action.
  9. npm run build- storybook - Build the Storybook to a static application (for deploying design system documentation elsewhere)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].