Apple Store Style Guide


Here you'll find all styles for all Theme UI components and Markdown spec


Markdown

Markdown-Cheatsheet


Headings

# h1
## h2
### h3
#### h4
##### h5
###### h6

h1

h2

h3

h4

h5
h6

Emphasis

Emphasis, aka italics, with _asterisks_ or _underscores_.
Strong emphasis, aka bold, with **asterisks** or **underscores**.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and underscores.

Strikethrough uses two tildes. Scratch this.


Lists

(In this example, leading and trailing spaces are shown with with dots: ⋅)

1. First ordered list item
2. Another item
3. Actual numbers don't matter, just that it's a number
4. And another item.
- Unordered list can use asterisks
* Or minuses
- Or pluses
  1. First ordered list item
  2. Another item
  3. Actual numbers don't matter, just that it's a number
  4. And another item.
  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

Links

There are two ways to create links.

[I'm an inline-style link](https://www.google.com)
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
[I'm a reference-style link][arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
example.com (but not on Github, for example).
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com

I'm an inline-style link

I'm an inline-style link with title

I'm a reference-style link

I'm a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or http://www.example.com and sometimes example.com (but not on Github, for example).

Some text to show that the reference links can follow later.


Images

Here's a kitten (hover to see the title text):
Inline-style:
![alt text](https://placedog.net/50/50 'Meow')
Reference-style:
![alt text][logo]
[logo]: https://placedog.net/50/50 'Purr'

Here's our logo (hover to see the title text):

Inline-style: alt text

Reference-style: alt text


Code Highlighting

Code blocks are part of the Markdown spec, but syntax highlighting isn't.

Inline `code` has `back-ticks` around it.

Inline code has back-ticks around it.

Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting, but you must provide a language or none

```javascript
var s = 'JavaScript syntax highlighting'
alert(s)
```
```python
s = "Python syntax highlighting"
print s
```
```html
<div>HTML syntax highlighting</div>
```
```none
var s = "JavaScript syntax highlighting"
alert(s)
```
var s = 'JavaScript syntax highlighting'
alert(s)
s = "Python syntax highlighting"
print s
<div>HTML syntax highlighting</div>
var s = "JavaScript syntax highlighting"
alert(s)

Tables

Tables aren't part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.

Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- | :-----------: | -----: |
| col 3 is | right-aligned | \$1600 |
| col 2 is | centered | \$12 |
| zebra stripes | are neat | \$1 |
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.
| Markdown | Less | Pretty |
| -------- | --------- | ---------- |
| _Still_ | `renders` | **nicely** |
| 1 | 2 | 3 |

Colons can be used to align columns.

TablesAreCool
col 3 isright-aligned\$1600
col 2 iscentered\$12
zebra stripesare neat\$1

There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.

MarkdownLessPretty
Stillrendersnicely
123

Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote.

Blockquotes are very handy in email to emulate reply text. This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.


Horizontal Rule

Three or more...
---
Hyphens
---
Asterisks
---
Underscores

Three or more...


Hyphens


Asterisks


Underscores


Line Breaks

My basic recommendation for learning how line breaks work is to experiment and discover -- hit <Enter> once (i.e., insert one newline), then hit it twice (i.e., insert two new lines), see what happens. You'll soon learn to get what you want. "Markdown Toggle" is your friend.

Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a _separate paragraph_.
This line is also a separate paragraph, but...
This line is only separated by a single newline, so it's a separate line in the _same paragraph_.

Components

theme-ui/components


Colors


Box

<Box p={4} color="white" bg="primary">
Beep
</Box>
Beep

Flex

<Flex>
<Box p={2} bg="primary" color="white" sx={{ flex: '1 1 auto' }}>
Flex
</Box>
<Box p={2} bg="highlight">
Box
</Box>
</Flex>
Flex
Box

Grid

<Grid gap={2} columns={[2, '1fr 2fr']}>
<Box p={2} bg="primary" color="white">
Box
</Box>
<Box p={2} bg="highlight">
Box
</Box>
</Grid>
Box
Box

Button

<Button mr={2}>primary</Button>
<Button mr={2} variant='secondary'>secondary</Button>
<Button mr={2} variant='accent'>secondary</Button>

Text

<Text>Hello</Text>
<Text variant='styles.p'>Hello</Text>
<Text variant='styles.small'>Hello</Text>
Hello
Hello
Hello

Heading

<Heading variant='styles.h1'>h1</Heading>
<Heading variant='styles.h2'>h2</Heading>
<Heading variant='styles.h3'>h3</Heading>
<Heading variant='styles.h4'>h4</Heading>
<Heading variant='styles.h5'>h5</Heading>
<Heading variant='styles.h6'>h6</Heading>

h1

h2

h3

h4

h5

h6


Link

<Link href="#!">Hello</Link>
Hello

Image

<Image src="https://placedog.net/400/400" />

Card

<Card
sx={{
maxWidth: 400,
}}
>
<Image src="https://placedog.net/800/600" />
<Box p={3}>
<Heading variant="styles.h4">Heading</Heading>
<Text>Text</Text>
</Box>
</Card>

Heading

Text

Forms

<Box as="form">
<Label htmlFor="input">Input</Label>
<Input name="username" mb={3} />
<Label mb={3}>
<Checkbox />
Checkbox
</Label>
<Label mb={3}>
<Radio name="radio" /> Radio A
</Label>
<Label mb={3}>
<Radio name="radio" /> Radio B
</Label>
<Label htmlFor="select">Select</Label>
<Select name="select" mb={3}>
<option>Beep</option>
<option>Boop</option>
<option>Blip</option>
</Select>
<Label htmlFor="textarea">Text Area</Label>
<Textarea name="textarea" rows="6" mb={3} />
</Box>

Label

<Label htmlFor="input">Label</Label>

Input

<Input name="username" />

Select

<Select defaultValue="Hello">
<option>Hello</option>
<option>Hi</option>
<option>Beep</option>
<option>Boop</option>
</Select>

Textarea

<Textarea defaultValue="Hello" rows={8} />

Radio

<Label mb={1}>
<Radio
name='dark-mode'
value='true'
defaultChecked={true}
/>
Dark Mode
</Label>
<Label mb={1}>
<Radio
name='dark-mode'
value='false'
/>
Light Mode
</Label>

Checkbox

<Label>
<Checkbox />
Checkbox
</Label>

Slider

<Slider defaultValue={25} />

Field

<Field label="Email" name="email" defaultValue="" />

Progress

<Progress max={1} value={1/2}> 50% </Progress>
<Progress max={1} value={1/2} variant='styles.progress.secondary'> 50% </Progress>
50%50%

Donut

<Donut value={1/2}/>
<Donut value={1/2} variant='styles.donut.secondary'/>

Spinner

<Spinner />
<Spinner variant='styles.spinner.secondary'/>
Loading...Loading...

Avatar

<Avatar src="https://placedog.net/50/50" />

Badge

Badges need a variant, the default can't be styled at the moment

<Badge variant='primary' mb={2} mr={2}>
Beep boop, this is an badge!
</Badge>
<Badge variant='secondary' mb={2} mr={2}>
Beep boop, this is an badge!
</Badge>
Beep boop, this is an badge!
Beep boop, this is an badge!

Close

<Close />

Alert

<Alert variant='primary' mb={2}>
Beep boop, this is an alert!
</Alert>
<Alert variant='secondary' mb={2}>
Beep boop, this is an alert!
</Alert>
Beep boop, this is an alert!
Beep boop, this is an alert!

Divider

<Divider />


Embed

<Embed src="https://www.youtube.com/embed/GNCd_ERZvZM" />

AspectRatio

<AspectRatio ratio={16 / 9}>
<Image
src="https://placedog.net/1200/1200"
sx={{
objectFit: 'cover',
}}
/>
</AspectRatio>

AspectImage

<AspectImage ratio={4 / 3} src="https://placedog.net/1200/1200" />

Container

<Container p={4} bg="muted">
Centered container
</Container>
Centered container

NavLink

<Flex as="nav">
<NavLink href="#!" p={2}>
Home
</NavLink>
<NavLink href="#!" p={2}>
Blog
</NavLink>
<NavLink href="#!" p={2}>
About
</NavLink>
</Flex>

Message

<Message variant='primary' mb={2}>
This is just a message for someone to read
</Message>
<Message variant='secondary' mb={2}>
This is just a message for someone to read
</Message>
This is just a message for someone to read
This is just a message for someone to read

IconButton

<IconButton aria-label="Toggle dark mode">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
width="24"
height="24"
fill="currentcolor"
>
<circle
r={11}
cx={12}
cy={12}
fill="none"
stroke="currentcolor"
strokeWidth={2}
/>
</svg>
</IconButton>

MenuButton

<MenuButton aria-label="Toggle Menu" />