-
Notifications
You must be signed in to change notification settings - Fork 4
/
buttons.html
319 lines (287 loc) · 20.9 KB
/
buttons.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
---
layout: default
title: Buttons
subnav:
- Default
- Primary
- Ubora
- Secondary
- Alert
- Inverse
- Disabled
- X-Large
- Inline
- Topics
- Full
- Pill
- Split
---
<section id="Buttons">
<h2 id="Default" class="m-b-1-xs" id="default">Default</h2>
<p class="m-b-3-xs">Use the class, <code>button</code> for this default style button. If you are using the <code><button></code> element, always specify a <code>type</code>. When using the <code><a></code> tag, include <code>role="button"</code> for accessibility. Each button is available in multiple sizes, take note of examples for classes.</p>
<a class="m-b-05-xs button button--large-xs" href>Large</a>
<a class="m-b-05-xs button" href>Normal</a>
<a class="m-b-05-xs button button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--large-xs" href>Large</a>
<a class="m-b-05-xs button" href>Normal</a>
<a class="m-b-05-xs button button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h3 class="text-4-xs m-b-1-xs">Size Across Breakpoints</h3>
<p class="m-b-3-xs">You can control the size of a button across breakpoints by tacking any of our breakpoint suffixes to the end of the button size class.</p>
<a class="m-b-05-xs button button--small-xs button--base-md button--large-xl" href>
<span class="block-xs hide-md">Small</span>
<span class="hide-xs block-md hide-xl">Normal</span>
<span class="hide-xs block-xl">Large</span>
</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--large-xs" href>Large</a></code></pre>
</div>
<h2 id="Primary-Teal-Blue" class="m-b-1-xs" id="primary">Primary (teal and blue)</h2>
<p class="m-b-3-xs">Primary buttons are used to indicate a <em>primary</em> action on the page. Use the class, <code>.button.button--primary-teal</code> or <code>.button.button--primary-blue</code>, to get a primary button on your page. These teal and blue primary buttons meet accessibility standards, so please use them going forward. The brand green ones below are supported, but are considered deprecated since they don't meet contrast ratio standards.</p>
<a class="m-b-05-xs button button--primary-teal button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-teal" href>Normal</a>
<a class="m-b-05-xs button button--primary-teal button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-teal button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--primary-teal button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-teal" href>Normal</a>
<a class="m-b-05-xs button button--primary-teal button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-teal button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<a class="m-b-05-xs button button--primary-blue button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-blue" href>Normal</a>
<a class="m-b-05-xs button button--primary-blue button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-blue button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--primary-blue button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-blue" href>Normal</a>
<a class="m-b-05-xs button button--primary-blue button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-blue button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id="Ubora" class="m-b-1-xs" id="primary">Primary Ubora</h2>
<p class="m-b-3-xs">For primary CTAs in the Ubora brand.</p>
<a class="m-b-05-xs button button--primary-ubora button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-ubora" href>Normal</a>
<a class="m-b-05-xs button button--primary-ubora button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-ubora button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--primary-ubora button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary-ubora" href>Normal</a>
<a class="m-b-05-xs button button--primary-ubora button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary-ubora button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id="Primary-Green" class="m-b-1-xs" id="primary">Primary (green - deprecated but legacy supported)</h2>
<p class="m-b-3-xs">These appear on older marketing pages; please don't use them going forward.</p>
<a class="m-b-05-xs button button--primary button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary" href>Normal</a>
<a class="m-b-05-xs button button--primary button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--primary button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--primary" href>Normal</a>
<a class="m-b-05-xs button button--primary button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--primary button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id="Secondary" class="m-b-1-xs" id="secondary">Secondary</h2>
<p class="m-b-3-xs">Secondary buttons are used to indicate a <em>secondary</em> action on the page. To access these styles, use the class, <code>.button.button--secondary</code>.</p>
<a class="m-b-05-xs button button--secondary button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--secondary" href>Normal</a>
<a class="m-b-05-xs button button--secondary button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--secondary button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--secondary button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--secondary" href>Normal</a>
<a class="m-b-05-xs button button--secondary button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--secondary button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id="Alert" class="m-b-1-xs" id="alert">Alert</h2>
<p class="m-b-3-xs">Alert buttons are used to indicate a urgent or negative action on the page. To access these styles, use the class, <code>.button.button--alert</code>.</p>
<a class="m-b-05-xs button button--alert button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--alert" href>Normal</a>
<a class="m-b-05-xs button button--alert button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--alert button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button alert button--large-xs" href>Large</a>
<a class="m-b-05-xs button alert" href>Normal</a>
<a class="m-b-05-xs button alert button--small-xs" href>Small</a>
<a class="m-b-05-xs button alert button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id='Inverse' class="m-b-1-xs" id="inverse">Inverse</h2>
<p class="m-b-3-xs">Inverse buttons are used when the background color a container is too dark for normal buttons to have enough contrast. Invert the style with the classes, <code>.button--inverse</code>, <code>.button--inverse-primary</code>, <code>.button--inverse-primary-teal</code>, <code>.button--inverse-disabled</code>, <code>.button--inverse-primary-disabled</code>.</p>
<div class="bg-gray-darker p-2-xs p-b-05-xs">
<a class="m-b-05-xs button button--inverse" href>Inverse</a>
<a class="m-b-05-xs button button--inverse-primary" href>Inverse Primary</a>
<a class="m-b-05-xs button button--inverse-primary-teal" href>Inverse Primary Teal</a>
<a class="m-b-05-xs button button--inverse-disabled" href>Inverse Disabled</a>
<a class="m-b-05-xs button button--inverse-primary-disabled" href>Inverse Primary Disabled</a>
</div>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--inverse" href>Inverse</a>
<a class="m-b-05-xs button button--inverse-primary" href>Inverse Primary</a>
<a class="m-b-05-xs button button--inverse-primary-teal" href>Inverse Primary Teal</a>
<a class="m-b-05-xs button button--inverse-disabled" href>Inverse Disabled</a>
<a class="m-b-05-xs button button--inverse-primary-disabled" href>Inverse Primary Disabled</a></code></pre>
</div>
<h2 id="Disabled" class="m-b-1-xs" id="disabled">Disabled</h2>
<p class="m-b-3-xs">Disabled buttons are used when the action on the page is blocked to the user. Get this button on a page by using the class, <code>.button.button--disabled</code>.</p>
<a class="m-b-05-xs button button--disabled button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--disabled" href>Normal</a>
<a class="m-b-05-xs button button--disabled button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--disabled button--xsmall-xs" href>X-Small</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--disabled button--large-xs" href>Large</a>
<a class="m-b-05-xs button button--disabled" href>Normal</a>
<a class="m-b-05-xs button button--disabled button--small-xs" href>Small</a>
<a class="m-b-05-xs button button--disabled button--xsmall-xs" href>X-Small</a></code></pre>
</div>
<h2 id="X-Large" class="m-b-1-xs" id="disabled">Extra Large Buttons</h2>
<p class="m-b-3-xs">These buttons should typically be reserved for marketing pages since the scale is pretty large and works better visually on marketing layouts.</p>
<a class="m-b-05-xs button button--xlarge-xs" href>Default</a>
<a class="m-b-05-xs button button--primary button--xlarge-xs" href>Primary</a>
<a class="m-b-05-xs button button--secondary button--xlarge-xs" href>Secondary</a>
<a class="m-b-05-xs button button--alert button--xlarge-xs" href>Alert</a>
<a class="m-b-05-xs button button--disabled button--xlarge-xs" href>Disabled</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--xlarge-xs" href>Default</a>
<a class="m-b-05-xs button button--primary button--xlarge-xs" href>Primary</a>
<a class="m-b-05-xs button button--secondary button--xlarge-xs" href>Secondary</a>
<a class="m-b-05-xs button button--alert button--xlarge-xs" href>Alert</a>
<a class="m-b-05-xs button button--disabled button--xlarge-xs" href>Disabled</a></code></pre>
</div>
<h2 id="Inline" class="m-b-1-xs" id="disabled">Inline Buttons</h2>
<p class="m-b-0-xs">These buttons are used when you have some inline text inputs and need a button at the end. It changes the padding and height to match the size of text inputs.</p>
<a class="m-b-05-xs button button--inline" href>Default</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button button--inline" href>Default</a></code></pre>
</div>
<h2 id="Categories" class="m-b-1-xs" id="category-color-button">Category Color Buttons</h2>
<p class="m-b-3-xs">Each button supports the full array of topic colors by adding the name of the category to the class. Use classes like, <code>button--category-fundamentals</code>, in conjunction with any other button class combo to set it as a category color. By default, this will effect the border and text color of the button. To use the primary button style with topic colors apply the category color class in conjunction with the <code>button--primary</code> class.</p>
<div class="m-b-05-xs">
<a class="m-b-05-xs button button button--category-fundamentals">Fundamentals</a>
<a class="m-b-05-xs button button button--category-front-end">Front End</a>
<a class="m-b-05-xs button button button--category-back-end">Back End</a>
<a class="m-b-05-xs button button button--category-data">Data</a>
<a class="m-b-05-xs button button button--category-design">Design</a>
<a class="m-b-05-xs button button button--category-mobile">Mobile</a>
<a class="m-b-05-xs button button button--category-experimental">Experimental</a>
<a class="m-b-05-xs button button button--category-undefined">Undefined</a>
</div>
<div>
<a class="m-b-05-xs button button--primary button--category-fundamentals">Fundamentals</a>
<a class="m-b-05-xs button button--primary button--category-front-end">Front End</a>
<a class="m-b-05-xs button button--primary button--category-back-end">Back End</a>
<a class="m-b-05-xs button button--primary button--category-data">Data</a>
<a class="m-b-05-xs button button--primary button--category-design">Design</a>
<a class="m-b-05-xs button button--primary button--category-mobile">Mobile</a>
<a class="m-b-05-xs button button--primary button--category-experimental">Experimental</a>
<a class="m-b-05-xs button button--primary button--category-undefined">Undefined</a>
</div>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><div class="m-b-05-xs">
<a class="m-b-05-xs button button--category-fundamentals">Fundamentals</a>
<a class="m-b-05-xs button button--category-front-end">Front End</a>
<a class="m-b-05-xs button button--category-back-end">Back End</a>
<a class="m-b-05-xs button button--category-data">Data</a>
<a class="m-b-05-xs button button--category-design">Design</a>
<a class="m-b-05-xs button button--category-mobile">Mobile</a>
<a class="m-b-05-xs button button--category-experimental">Experimental</a>
<a class="m-b-05-xs button button--category-undefined">Undefined</a>
</div>
<div>
<a class="m-b-05-xs button button--primary button--category-fundaments">Fundamentals</a>
<a class="m-b-05-xs button button--primary button--category-front-end">Front End</a>
<a class="m-b-05-xs button button--primary button--category-back-end">Back End</a>
<a class="m-b-05-xs button button--primary button--category-data">Data</a>
<a class="m-b-05-xs button button--primary button--category-design">Design</a>
<a class="m-b-05-xs button button--primary button--category-mobile">Mobile</a>
<a class="m-b-05-xs button button--primary button--category-experimental">Experimental</a>
<a class="m-b-05-xs button button--primary button--category-undefined">Undefined</a>
</div></code></pre>
</div>
<h2 id="Full" class="m-b-1-xs" id="disabled">Full Width</h2>
<p class="m-b-3-xs">Make any button span the full width of its container by using the class, <code>w-full-xs</code>. The padding and text size will be controlled by whichever size class you add. You can control the full-width aspect of the button with breakpoint suffixes.</p>
<a class="m-b-05-xs button w-full-xs m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--alert m-b-05-xs" href>Button</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button w-full-xs m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs button--alert m-b-05-xs" href>Button</a></code></pre>
</div>
<p class="m-b-3-xs">These buttons will only be full width on screen that are <code>xs</code>, <code>md</code>, and <code>lg</code>.</p>
<a class="m-b-05-xs button w-full-xs w-auto-lg m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--alert m-b-05-xs" href>Button</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button w-full-xs w-auto-lg m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button w-full-xs w-auto-lg button--alert m-b-05-xs" href>Button</a></code></pre>
</div>
<h2 id="Pill" class="m-b-1-xs" id="disabled">Pill Buttons (Tags)</h2>
<p class="m-b-3-xs">Any button can become a pill button by adding the class <code>circle</code> alongside button classes.</p>
<a class="m-b-05-xs button circle m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--alert m-b-05-xs" href>Button</a>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><a class="m-b-05-xs button circle m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--primary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--secondary m-b-05-xs" href>Button</a>
<a class="m-b-05-xs button circle button--alert m-b-05-xs" href>Button</a></code></pre>
</div>
<h2 id="Split" class="m-b-1-xs" id="split-buttons">Split Buttons</h2>
<p class="m-b-3-xs">Split buttons are used when you need a button that contains two actions. To accomplish this, wrap your buttons in <code><div class="split-button"></code>.</p>
<div class="split-button">
<a class="m-b-05-xs button" href>Add</a>
<a class="m-b-05-xs button" href>Remove</a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--primary" href>Add</a>
<a class="m-b-05-xs button button--primary" href>Remove</a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--secondary" href>Add</a>
<a class="m-b-05-xs button button--secondary" href>Remove</a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--alert" href>Add</a>
<a class="m-b-05-xs button button--alert" href>Remove</a>
</div>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><div class="split-button">
<a class="m-b-05-xs button" href>Add</a>
<a class="m-b-05-xs button" href><%= icon('add') %></a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--primary" href>Add</a>
<a class="m-b-05-xs button button--primary" href>Remove</a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--secondary" href>Add</a>
<a class="m-b-05-xs button button--secondary" href>Remove</a>
</div>
<div class="split-button">
<a class="m-b-05-xs button button--alert" href>Add</a>
<a class="m-b-05-xs button button--alert" href>Remove</a>
</div></code></pre>
</div>
<!-- Coming Soon
<h2 class="m-b-1-xs" id="with-icon">With Icon</h2>
<p class="m-b-3-xs">Each button type can handle the addition of an icon. Depending on whether you are adding the icon before or after the text, you'll use the classes <code>icon-on-left</code> or <code>icon-on-right</code>. Each icon is given the default text color of the button it's contained in. All other styles, such as width, height, position, etc. should be applied as a custom, page-specific style</p>
<button class="m-b-05-xs button icon-on-left"><%= icon('add') %> Add</button>
<button class="m-b-05-xs button icon-on-left"><%= icon('remove') %> Remove</button>
<button class="m-b-05-xs button icon-on-left"><%= icon('resume') %> Resume</button>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><button class="m-b-05-xs button icon-on-left"><%= icon('add') %> Add</button>
<button class="m-b-05-xs button icon-on-left"><%= icon('close') %> Close</button>
<button class="m-b-05-xs button icon-on-left"><%= icon('resume') %> Resume </button></code></pre>
</div>
-->
</section>