-
Notifications
You must be signed in to change notification settings - Fork 224
Frequently Asked Questions (FAQ)
Vue Design System is an open source tool for building UI Design Systems with Vue.js. It provides you and your team a set of organized tools, patterns & practices that work as the foundation for your application development. Read more about it.
The development environment supports the following browsers. To tweak browsers supported in production you will want to edit the browsers list in package.json. To see what browsers are selected by the browser list, run npx browserslist --config="package.json"
in the root directory of this project.
BROWSER | VERSION |
---|---|
Google Chrome | Latest |
Microsoft Edge | Latest |
Mozilla Firefox | Latest |
Opera | Latest |
Safari | Latest |
See the Getting Started guide on GitHub.
Definitely possible, see instructions in Getting Started guide.
Short answer: A personal preference that I’ve noticed working with my clients.
Long(er) answer: The reason for choosing Vue.js over React or some other library is how easy it is to learn. If you know HTML, CSS, and a bit of JavaScript you’re ready to start using this tool and getting involved. This becomes especially important when we want to involve designers more into the process and move further away from static design tools. In addition, static site generators like Jekyll give you a bit too much freedom, which makes it harder for people to follow specific guidelines or a workflow.
Compared to Atomic Design, this setup doesn’t include molecule/page levels. They’re omitted to help reduce the complexity of the system for its end-users.
Organizations that have more than just Vue.js based applications can benefit from Vue Design System as well. Tokens which store visual design attributes are universal and can be used on any platform. Vue Design System also renders all components in both Vue.js & HTML which allows you to use the components on any web based platform. Additionally, it’s possible to configure the build process to output Web Components instead of Vue.js Components.
Vue Design System is not a front-end component library and never will be. Instead it tries to provide you and your team a set of organized tools, patterns & practices to build upon, so that you can get started with the actual design system faster.
Definitely. See Theo’s docs. It allows you to convert the tokens to almost any format you can think of. The formats used are being configured in package.json.
Yes, follow the getting started guide to get things up and running.
Vue Design System uses a customized version of Vue Styleguidist for the styleguide part which already supports something similar. You can for example define multiple examples in markdown format in the component’s <docs>
section. I’ve added an example of this in the documentation’s Elements section. See the documentation for Vue Styleguidist and React Styleguidist’s explanation on the differences between Storybook and Styleguidist.
Icons are inside src/assets/icons
directory, so you can just add any icons that you need. Use for example SVG files from Font Awesome.
Vue Design System uses Typekit’s Web Font Loader which is easy to configure. To load your own font files, see Getting Started with WebFontLoader. Currently, the app is loading Fira Sans and a few different weights from Google Fonts. See src/utils/webFontLoader.js
for an example.
If you want to bundle your fonts into the project itself, that’s possible as well. I’ve created a separate branch with an example of this. See the needed changes in this commit.
First, import tokens inside the component you want to use them in:
<script>
import designTokens from "@/assets/tokens/tokens.raw.json";
</script>
Then, pass the data:
<script>
export default {
data() {
return {
tokens: designTokens.props
};
}
};
</script>
Once done, you can utilize tokens inside <template>
like this:
<template>
<Thing :style="{color: tokens.color_vermilion.value}" />
</template>
.wrapper {
padding: $space-l;
@media #{$media-query-l} {
padding: $space-xl;
}
}
Remove --open
option from this line in package.json.
You can put your assets under src/assets
. It’s ok to create new directories under that directory as well. Since Webpack is used to include all static assets on the Vue app side, you’ll have to define the path like this in order for it to work on both the app and the styleguide: <img src="@/assets/img/example.jpg" />
.
For component’s <docs>
section things work a bit differently. Using <img src="img/example.jpg" />
without @/assets/
works there. This is because Styleguidist handles the assets directory a bit differently.
Yes! While we don’t currently have extensive documentation on this, there’s an official example and instructions provided, here: github.com/viljamis/nuxt-design-system.
Please see the official example first: github.com/viljamis/vue-design-system-example. If you’re getting an error about export 'default' was not found
you’re probably trying to import the provided UMD module as an ES Module.
They are, but you need to add the following to the Webpack configuration for build:
options: {
// enable CSS Modules
modules: true,
// customize generated class names
localIdentName: '[local]_[hash:base64:8]'
}
For more detailed instructions, please see: vue-loader.vuejs.org/guide/css-modules.html
Yes you can. See the official example on GitHub: github.com/viljamis/vue-design-system-example-website
- Getting Started: How to install and run Vue Design System.
- Terminology: Introduction to the system concepts and its hierarchy.
- Naming of Things: Naming is hard, so it’s good to have clear guidelines.
- Directory Structure: What goes where and why.
-
Working with the System: Concrete examples on how to work with
Tokens
,Elements
,Patterns
andTemplates
. - Editing Living Documentation: How to customize the living system documentation.
- Spacing: A framework for creating a predictable and harmonious spacing.
- Component Status: Clear labels that reflect the state of completion.
- Component QA: How to review new components and keep the quality high.
- Contributing: A set of guidelines for contributing to the system.
- Code of Conduct: By participating you agree to abide by its terms.
- Frequently Asked Questions: How to use icons, how to use font-face, etc.
- Changelog: See releases pafge for the full changelog.