KISS your UI
Atomic Design for your components framework
@m4d_zhttps://talks.m4dz.net/kiss-your-ui/en/We are building apps!
(not websites)
Those apps have complex UIs
Those UIs agregates a lot of elements
How could we maintain
a high level of abstraction
to avoid code nightmares?
Designer (n.) :
One that produces wireframes, moodboards, concepts, using… Components
Frontend Designer (n.) :
One that build interfaces with semantics and CSS frameworks that are… Components Oriented
Frontend Developer (n.) :
One that creates business logics using separation of concerns patterns supported by… Components Frameworks
We even made a standard called… WebComponents!
At the (very) beginning, I’m a Chemist
Precisely, I’m a Micro-biologist
We should get inspired by other disciplines
Atomic Design details all that goes into creating and maintaining robust design systems, allowing your organization to roll out higher quality, more consistent UIs faster than ever before.
Why “Atomic”?
Atoms
Molecules
Organisms
Templates
Pages
We write components
<template>
<p>Hello {{name}}!</p>
</template>
module.exports = {
data () {
return {
name: 'John Doe'
}
}
}
p {
font-weight: 700;
}
Semantics matters!
<template>
<atom-avatar :alt="name">
<p>Hello {{name}}!</p>
</template>
Externalize your templates!
at least, make them accessible outside
Load/Inject at build
module.export = {
template: require('./atoms/avatar.html')
data () {
return {
name: "John Doe"
}
}
}
Avoid CSS Cascading Vortex!
Use controlled scoped styles
(BEM, SMACSS, OOCSS,…)
<p>Hello <span class="atom__name">{{name}}</span></p>
.atom__name {
font-weight: 700;
}
Keep your stuff organized
├── atoms
│ ├── feedback
│ │ ├── alert.vue
│ │ └── date.vue
│ └── images
│ ├── avatar.vue
│ └── logo.vue
├── molecules
│ ├── blocks
│ │ └── hero.vue
│ ├── forecast
│ │ └── preview.vue
│ ├── indicators
│ │ ├── forecast.vue
│ │ └── movements.vue
│ └── navigation
│ ├── breadcrumb.vue
│ └── panel.vue
├── organisms
Exploit your toolkit 🧰
<div class="container" role="application">
<organisms-header />
<router-view />
</div>
import OrganismsHeader from '~organisms/common/header'
export default {
name: 'pages-app'
components: { OrganismsHeader }
}
@import "uikit"
body
@extend %font-style-main
background-color: $white
Pattern Lab
Pattern Lab helps you and your team build thoughtful, pattern-driven user interfaces using atomic design principles.
Load external templates in Pattern Lab
Run components demos
Use Functional Programming patterns
to build Context less components
KSS
Variables
Molecules
Organisms
Your Custom Styles Library
(use @extend
a lot)
How to use it 💸? By hand
Keeping
your work consistent
Keep in mind to:
→ Share elements across realms
Paranoïd Web Dino · Tech Evangelist
https://talks.m4dz.net/kiss-your-ui/en/ Available under licence CC BY-SA 4.0
m4dz, CC BY-SA 4.0
Courtesy of Unsplash and Pexels contributors
Powered by Reveal.js
Source code available at
https://git.madslab.net/talks