2017-10-12 21:15:51 +03:00
|
|
|
|
Joyent's font is Libre Franklin, which is available to use at [Google
|
|
|
|
|
Fonts](https://fonts.google.com/specimen/Libre+Franklin).
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
The font sizes in the toolkit are based on an [augmented fourth modular
|
|
|
|
|
scale](http://www.modularscale.com/?15,24&px&1.414), with base font size of
|
|
|
|
|
**15px**.
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
### Headings
|
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
Headings are available from `h1` through to `h4`. If demand is shown for `h5`
|
|
|
|
|
and `h6`, these will be included in the toolkit.
|
2017-09-26 14:12:15 +03:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
To learn more about the correct usage of HTML headings, visit [MDN web
|
|
|
|
|
docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).
|
2017-09-26 14:12:15 +03:00
|
|
|
|
|
|
|
|
|
#### Heading 1
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const H1 = require('/').H1;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<H1>Inspire the lazy</H1>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
#### Heading 2
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const H2 = require('/').H2;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<H2>Inspire the lazy</H2>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
#### Heading 3
|
2017-10-09 16:35:52 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const H3 = require('/').H3;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<H3>Inspire the lazy</H3>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
#### Heading 4
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const H4 = require('/').H4;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<H4>Inspire the lazy</H4>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
|
|
|
|
|
2017-10-04 19:38:59 +03:00
|
|
|
|
### Paragraph
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const P = require('/').P;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<P>
|
|
|
|
|
Joyent experts provide 360 degree support for modern application
|
|
|
|
|
architectures, including development frameworks, container orchestration
|
|
|
|
|
tools, and hybrid cloud infrastructures.
|
|
|
|
|
</P>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Small
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
|
|
|
|
If you need to display content that is less important that the main body text,
|
|
|
|
|
or where space is more constrained, you can use the `<small>` element. This will
|
|
|
|
|
reduce the text size to 13px.
|
2017-09-26 14:12:15 +03:00
|
|
|
|
|
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const Small = require('/').Small;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
<Small>
|
2017-10-12 21:15:51 +03:00
|
|
|
|
Triton is 100% open source and designed to eliminate cloud provider lock-in.
|
|
|
|
|
With support for popular container management tools like Kubernetes, augmented
|
|
|
|
|
by our own open source project ContainerPilot, we are working with the
|
|
|
|
|
community to deliver simple to operate platform services that are open and
|
|
|
|
|
portable.
|
|
|
|
|
</Small>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Label
|
2017-10-04 19:38:59 +03:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
The `<label>` element is used for captions in the user interface and information
|
|
|
|
|
labels (i.e. text that is not continuous body text).
|
|
|
|
|
|
|
|
|
|
Read more about using the `<label>` element on the [MDN web
|
|
|
|
|
docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label).
|
2017-09-26 14:12:15 +03:00
|
|
|
|
|
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const Label = require('/').Label;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
<Label>
|
2017-10-12 21:15:51 +03:00
|
|
|
|
Hybrid, Modern and Open, Triton is engineered to run the world’s largest cloud
|
|
|
|
|
native applications
|
|
|
|
|
</Label>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
|
|
|
|
|
2017-10-04 19:38:59 +03:00
|
|
|
|
### Anchors
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
|
|
|
|
Links in the toolkit are named `Anchor`. This is to avoid confusion with `Link`,
|
|
|
|
|
which is a [React Router routing
|
|
|
|
|
link](http://knowbody.github.io/react-router-docs/api/Link.html).
|
2017-09-26 14:12:15 +03:00
|
|
|
|
|
|
|
|
|
#### Primary
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
2017-10-04 19:38:59 +03:00
|
|
|
|
Primary anchor is a type of a link that sits outside the body text.
|
2017-09-26 19:07:45 +03:00
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const Anchor = require('/').Anchor;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-09-26 19:07:45 +03:00
|
|
|
|
<Anchor href="https://joyent.com">Inspire the lazy</Anchor>
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
|
|
|
|
|
2017-09-26 19:07:45 +03:00
|
|
|
|
#### Reversed
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
|
|
|
|
Reversed anchors is used on dark backgrounds, where a default anchor would not
|
|
|
|
|
provide enough contrast.
|
2017-09-26 19:07:45 +03:00
|
|
|
|
|
2017-10-09 16:35:52 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-09-26 14:12:15 +03:00
|
|
|
|
const Anchor = require('/').Anchor;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<span
|
|
|
|
|
style={{
|
2017-10-09 16:35:52 +03:00
|
|
|
|
'background-color': '#3B46CC',
|
|
|
|
|
height: 80,
|
|
|
|
|
width: 250,
|
|
|
|
|
display: 'flex',
|
|
|
|
|
'align-items': 'center',
|
|
|
|
|
'justify-content': 'center'
|
2017-10-12 21:15:51 +03:00
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Anchor href="https://joyent.com" reversed>
|
|
|
|
|
Inspire the lazy secondary
|
|
|
|
|
</Anchor>
|
|
|
|
|
</span>;
|
2017-09-26 14:12:15 +03:00
|
|
|
|
```
|
2017-09-26 19:07:45 +03:00
|
|
|
|
|
2017-10-09 16:35:52 +03:00
|
|
|
|
#### In text anchor
|
2017-10-12 21:15:51 +03:00
|
|
|
|
|
|
|
|
|
In-paragraph anchor is a link that sits inside a text components. The default
|
|
|
|
|
state does not have an underline. The underline appears on hover and click.
|
2017-10-09 16:35:52 +03:00
|
|
|
|
|
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-10-09 16:35:52 +03:00
|
|
|
|
const Anchor = require('/').Anchor;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<p>
|
|
|
|
|
Body text. Crack that whip. Give the past a slip. Step on a crack. Break your
|
|
|
|
|
momma's back. When a problem comes along.You must whip it.
|
|
|
|
|
<Anchor href="#">Learn More</Anchor>
|
|
|
|
|
</p>;
|
2017-10-09 16:35:52 +03:00
|
|
|
|
```
|
|
|
|
|
|
2017-10-04 19:38:59 +03:00
|
|
|
|
#### Disabled
|
2017-10-09 16:35:52 +03:00
|
|
|
|
|
2017-10-04 19:38:59 +03:00
|
|
|
|
Disabled anchors cannot be actioned and the cursor is disabled.
|
2017-09-26 19:07:45 +03:00
|
|
|
|
|
2017-10-09 16:35:52 +03:00
|
|
|
|
```jsx
|
2017-10-31 12:03:44 +02:00
|
|
|
|
const React = require('react');
|
2017-10-12 21:15:51 +03:00
|
|
|
|
const Anchor = require('/').Anchor;
|
2017-10-31 12:03:44 +02:00
|
|
|
|
|
2017-10-12 21:15:51 +03:00
|
|
|
|
<Anchor disabled href="https://joyent.com">
|
|
|
|
|
Inspire the lazy disabled
|
|
|
|
|
</Anchor>;
|
2017-10-04 19:38:59 +03:00
|
|
|
|
```
|