SlideShare uma empresa Scribd logo
1 de 103
Baixar para ler offline
Real-world component
libraries at scale
ngVikings 2019
@ddprrt @Ka_TriN_F
Slide about usKatrin Freihofner

@Ka_TriN_F
barista.dynatrace.com
Slide about usStefan Baumgartner

@ddprrt
scriptconf.org
Designer : Developer
Designer : Developer
Designer : Developer
Patterns
Barista Design System
Angular components
Barista Design System
A collection of reusable components,
patterns, and styles. 
Barista Design System
Single source of truth
…in code
button
button link
button link toggle
The appearance of a component is
coupled to its behaviour and can’t be
separated.
Developer experience
Code examples
Do it like
Material
Do
it
like
Material
Okay…
Let’s look at Material
Component infrastructure and
Material Design components for Angular
https://github.com/angular/components
Angular Devs know Material
Why not Material directly?
Component Development Kit
Straightforward APIs that don't confuse
developers
https://github.com/angular/components
$white: #ffffff;
$turquoise-100: #e1f7f9;
$turquoise-200: #aeebf0;
$turquoise-300: #74dee6;
$turquoise-400: #4fd5e0;
$turquoise-500: #00b9cc;
$turquoise-600: #00a1b2;
$turquoise-700: #00848e;
$turquoise-800: #006d75;
$turquoise-900: #005559;
$green-100: #e8f9dc;
$green-200: #d2efbe;
$green-300: #bee5a3;
$green-400: #9cd575;
$green-500: #7dc540;
$green-600: #5ead35;
$green-700: #3f962a;
$green-800: #1f7e1e;
$green-900: #006613;
$blue-100: #e0f4fc;
$blue-200: #b4e5f9;
$blue-300: #74cff7;
$blue-400: #2ab6f4;
$blue-500: #14a8f5;
$blue-600: #008cdb;
900: $yellow-900,
),
'shamrockgreen': (
100: $shamrockgreen-100,
200: $shamrockgreen-200,
300: $shamrockgreen-300,
400: $shamrockgreen-400,
500: $shamrockgreen-500,
600: $shamrockgreen-600,
700: $shamrockgreen-700,
800: $shamrockgreen-800,
900: $shamrockgreen-900,
),
'gray': (
100: $gray-100,
200: $gray-200,
300: $gray-300,
400: $gray-400,
500: $gray-500,
600: $gray-600,
700: $gray-700,
800: $gray-800,
900: $gray-900,
),
);
@function get-color($color, $shade) {
@return map-get(map-get($full-color-palette, $color), $shade);
}
Defensive components
Work in any context. Any environment.
Layout vs Styling
Layout defines structure
Components are fluid
width: auto;
max-width: 100%;
text-overflow: ellipsis;
Intrinsic width
constrained by layout
width: 100%;
Set width
constrained by layout
Respect HTML elements
.dt-button {
@include main-font(30px);
box-sizing: border-box;
position: relative;
// Reset browser <button> styles.
@include dt-interactive-reset();
// Make anchors render like buttons.
display: inline-block;
white-space: nowrap;
text-decoration: none;
text-align: center;
overflow: hidden;
vertical-align: middle;
height: 32px;
border-style: solid;
border-radius: 3px;
border-width: 1px;
padding-top: 0;
padding-bottom: 0;
padding-left: 15px;
padding-right: 15px;
line-height: -moz-block-height;
background: transparent;
}
.dt-button {
box-sizing: border-box;
position: relative;
// Reset browser <button> styles.
// Make anchors render like buttons.
display: inline-block;
white-space: nowrap;
text-decoration: none;
text-align: center;
overflow: hidden;
vertical-align: middle;
height: 32px;
border-style: solid;
border-radius: 3px;
border-width: 1px;
padding-top: 0;
padding-bottom: 0;
padding-left: 15px;
padding-right: 15px;
line-height: -moz-block-height;
background: transparent;
}
@include main-font(30px);
@include dt-interactive-reset();
Always reset browser defaults
Re-define inheritable properties per
component
Your component
Never assume any type
<dt-card headline=“It is beautiful”>
</dt-card>
<dt-card headline=“It is beautiful”>
</dt-card>
Cool! Can you make it bold?
<dt-card headline=“It is beautiful”>
</dt-card>
.headline {
font-weight: bold
}
<dt-card headline=“It is beautiful”>
</dt-card>
.headline {
font-weight: bold
}
<dt-card headline=“It is beautiful”>
</dt-card>
.headline {
font-weight: bold
}
No, I meant: Can you
make 

it bold?
!
<dt-card>
<dt-headline>
<strong>It is bold</strong>
</dt-headline>
</dt-card>
<div class="dt-card-header">
<div class="dt-card-heading">
<ng-content select=“dt-headline"></ng-content>
</div>
<ng-content></ng-content>
</div>
Content projection is your friend
View encapsulation
It's "just" a string - Learnings from building a component library 
Design-first vs. Code-first
Design-first
Barista
Design System
UX + design Angular
component lib
Barista
Design System
UX + design Angular
component lib
Barista
Design System
UX + design Angular
component lib
Code-first
Code-first
Barista
Design System
UX + design Angular
component lib
Barista
Design System
UX + design Angular
component lib
Barista
Design System
UX + design Angular
component lib
Design vs. Code-first
…it depends
Design-first
Code-first
Behaviour and style go together
Code defensively
Katrin Freihofner

@Ka_TriN_F
Stefan Baumgartner

@ddprrt
Office hours

14:15

Mais conteúdo relacionado

Semelhante a Real-world component libraries at scale

Design System Ops
Design System OpsDesign System Ops
Design System OpsQvik
 
Making your site printable: WordCamp Buffalo 2013
Making your site printable: WordCamp Buffalo 2013Making your site printable: WordCamp Buffalo 2013
Making your site printable: WordCamp Buffalo 2013Adrian Roselli
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Todd Zaki Warfel
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2cori0506
 
Hello I a having an issue with the code written in this ass.pdf
Hello I a having an issue with the code written in this ass.pdfHello I a having an issue with the code written in this ass.pdf
Hello I a having an issue with the code written in this ass.pdfabsgroup9793
 
Designing and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsDesigning and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsSteve Smith
 
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...dezyneecole
 
Donut chart in Revit with Dynamo
Donut chart in Revit with DynamoDonut chart in Revit with Dynamo
Donut chart in Revit with DynamoWojciech Klepacki
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RPaul Richards
 
Metro Wi B Product Overview 11 09
Metro Wi B Product Overview 11 09Metro Wi B Product Overview 11 09
Metro Wi B Product Overview 11 09irobbin2
 
DG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteDG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteFranco De Bonis
 
Angular Web Components
Angular Web ComponentsAngular Web Components
Angular Web ComponentsOrkhan Gasimov
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter Bootstrapdarbyfrey
 
Twitter Bootstrap (spring)
Twitter Bootstrap (spring)Twitter Bootstrap (spring)
Twitter Bootstrap (spring)darbyfrey
 
Google I/O 2018 Extended, Baghdad - Flutter
Google I/O 2018 Extended, Baghdad  - FlutterGoogle I/O 2018 Extended, Baghdad  - Flutter
Google I/O 2018 Extended, Baghdad - FlutterAbdElmomenKadhim
 

Semelhante a Real-world component libraries at scale (20)

Design System Ops
Design System OpsDesign System Ops
Design System Ops
 
Webtech File.docx
Webtech File.docxWebtech File.docx
Webtech File.docx
 
Making your site printable: WordCamp Buffalo 2013
Making your site printable: WordCamp Buffalo 2013Making your site printable: WordCamp Buffalo 2013
Making your site printable: WordCamp Buffalo 2013
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2
 
Hello I a having an issue with the code written in this ass.pdf
Hello I a having an issue with the code written in this ass.pdfHello I a having an issue with the code written in this ass.pdf
Hello I a having an issue with the code written in this ass.pdf
 
Designing and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web AppsDesigning and Developing Windowed Interfaces for Web Apps
Designing and Developing Windowed Interfaces for Web Apps
 
Angular Web Components
Angular Web ComponentsAngular Web Components
Angular Web Components
 
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
Kirtesh Khandelwal,Project on HTML and CSS ,Final Year BCA , Dezyne E'cole Co...
 
Donut chart in Revit with Dynamo
Donut chart in Revit with DynamoDonut chart in Revit with Dynamo
Donut chart in Revit with Dynamo
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in R
 
Metro Wi B Product Overview 11 09
Metro Wi B Product Overview 11 09Metro Wi B Product Overview 11 09
Metro Wi B Product Overview 11 09
 
DG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteDG Group - Active Or Passive Website
DG Group - Active Or Passive Website
 
Angular Web Components
Angular Web ComponentsAngular Web Components
Angular Web Components
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter Bootstrap
 
Gmail tutorials
Gmail tutorialsGmail tutorials
Gmail tutorials
 
Twitter Bootstrap (spring)
Twitter Bootstrap (spring)Twitter Bootstrap (spring)
Twitter Bootstrap (spring)
 
Wireframing
WireframingWireframing
Wireframing
 
Google I/O 2018 Extended, Baghdad - Flutter
Google I/O 2018 Extended, Baghdad  - FlutterGoogle I/O 2018 Extended, Baghdad  - Flutter
Google I/O 2018 Extended, Baghdad - Flutter
 
Atomic Design con Pattern Lab
Atomic Design con Pattern LabAtomic Design con Pattern Lab
Atomic Design con Pattern Lab
 

Mais de Stefan Baumgartner

Mais de Stefan Baumgartner (13)

WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?
 
Serverless Rust
Serverless RustServerless Rust
Serverless Rust
 
What TypeScript taught me about JavaScript
What TypeScript taught me about JavaScriptWhat TypeScript taught me about JavaScript
What TypeScript taught me about JavaScript
 
Jamstack on Azure
Jamstack on AzureJamstack on Azure
Jamstack on Azure
 
TypeScript's Type System
TypeScript's Type SystemTypeScript's Type System
TypeScript's Type System
 
The hero's journey
The hero's journeyThe hero's journey
The hero's journey
 
Sketchmine: Design Systems Tooling
Sketchmine: Design Systems ToolingSketchmine: Design Systems Tooling
Sketchmine: Design Systems Tooling
 
Automating UI development
Automating UI developmentAutomating UI development
Automating UI development
 
A hero's journey in JavaScript frameworks
A hero's journey in JavaScript frameworksA hero's journey in JavaScript frameworks
A hero's journey in JavaScript frameworks
 
[German] Ab mit dem Kopf!
[German] Ab mit dem Kopf![German] Ab mit dem Kopf!
[German] Ab mit dem Kopf!
 
Advanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.jsAdvanced JavaScript build pipelines using Gulp.js
Advanced JavaScript build pipelines using Gulp.js
 
Speed Index, explained!
Speed Index, explained!Speed Index, explained!
Speed Index, explained!
 
Plumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshopPlumbin Pipelines - A Gulp.js workshop
Plumbin Pipelines - A Gulp.js workshop
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Real-world component libraries at scale