Slide 1

Slide 1 text

From Style Guides to Component Libraries

Slide 2

Slide 2 text

Outline ● The 3 Building Blocks of Web Pages Establish a baseline. A quick overview of the three main languages used to create web pages. ● The Rise of Style Guides Set historical context. Looking back at the evolution of style guides, starting with brand standards. ● Shift Toward Component Thinking The epiphany. Modern web design and development looks very different from even a few years ago. ● Component-ized Style Guides Bring it together. Now we bring together modern component thinking with the idea of a style guide.

Slide 3

Slide 3 text

The 3 Building Blocks of Web Pages

Slide 4

Slide 4 text

HTML: HyperText Markup Language “The most basic building block on the web. It defines and describes the content of a webpage.”

Slide 5

Slide 5 text

CSS: Cascading Style Sheets “It describes the presentation of a document written in HTML. CSS describes how elements should be rendered on screen, on paper, in speech, or on other media.”

Slide 6

Slide 6 text

JavaScript “JavaScript runs in the Web browser. It allows HTML documents to have behavior, usually triggered by the occurrence of an event.”

Slide 7

Slide 7 text

How they all come together Think of a house... HTML CSS JavaScript The structure of your application. The appearance of your application. The behavior of your application.

Slide 8

Slide 8 text

The Rise of Style Guides

Slide 9

Slide 9 text

Graphical Brand Standards Style guides have their roots in graphic design, advertising, and other printed media where you want visual consistency across multiple artifacts. In the context of web pages, a printed reference is only useful to a point. While the graphical standards remain important, the medium is inherently different. Brand standards must expand to accommodate digital interface affordances.

Slide 10

Slide 10 text

Static Style Guide The transition from printed brand guidelines to a web-compatible solution gives us Static Style Guides. A Static Style Guide is a standalone representation of a User Interface (UI), with no direct link to code. ✗ Usually created by a graphic designer using graphic design software ✗ Webpage styling may not look like the static style guide ✗ Quickly gets out of sync with the actual web site

Slide 11

Slide 11 text

Living Style Guide It would be better if the style guide and the web site could be kept in sync automatically. A Living Style Guide is auto-generated from the codebase when changes are made, hence… living.” ✓ Style Guide uses actual CSS ✗ Still have to maintain the Style Guide code separately from the actual web site code. ✗ Copy and paste from the Style Guide creates duplication that becomes difficult to maintain in the long term

Slide 12

Slide 12 text

Shift toward Component Thinking

Slide 13

Slide 13 text

A Component is an independent, reusable unit of your webpage.

Slide 14

Slide 14 text

Component-based Web Development HTML JavaScript CSS Traditional web development Component-based web development Component HTML CSS JavaScript Component HTML CSS JavaScript Component HTML CSS JavaScript Component HTML CSS JavaScript

Slide 15

Slide 15 text

A Component-based Application Guided Search

Slide 16

Slide 16 text

Component-ized Style Guides

Slide 17

Slide 17 text

A style guide is only a guide.

Slide 18

Slide 18 text

A component library is part of the application.

Slide 19

Slide 19 text

A Component Library Toast HTML CSS JavaScript Dropdown HTML CSS JavaScript Input Field HTML CSS JavaScript Masked Data HTML CSS JavaScript Independent Application Agnostic

Slide 20

Slide 20 text

How to Make a Component-ized Style Guide Components Application Code Showcase Web site Web site! InputField HTML CSS JavaScript Dropdown HTML CSS JavaScript Toast HTML CSS JavaScript Masked Data HTML CSS JavaScript

Slide 21

Slide 21 text

Without a Component Library Quick Search Form

Slide 22

Slide 22 text

Using the Component Library Quick Search Component

Slide 23

Slide 23 text

End