Skip to content

Commit 1603f97

Browse files
committed
update documentation for core installation
1 parent 63c4828 commit 1603f97

File tree

7 files changed

+35
-6
lines changed

7 files changed

+35
-6
lines changed

packages/components/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Primitive layout, typographic, and other components for use with Theme UI.
55

6+
**Note:** This package is already included with the main `theme-ui` package, therefore a separate installation is not required.
7+
68
```sh
79
npm i @theme-ui/components
810
```

packages/core/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ Core Emotion and JSX implementation for Theme UI
55

66
https://theme-ui.com
77

8-
**Note:** *This package is included in the main `theme-ui` package, and generally should not be used on its own.*
9-
108
```sh
119
npm i @theme-ui/core
1210
```
1311

12+
## Usage
13+
14+
This package is already included in the main `theme-ui` package. However, for a minimal installation, it's possible to install this standalone and then subsequently install only the packages you require.
15+
1416
## API
1517

1618
- `jsx`

packages/docs/src/pages/getting-started/index.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ title: Getting Started
44

55
# Getting Started
66

7-
Install Theme UI.
7+
The `theme-ui` package includes a recommended set of packages out of the box, including [MDX support](/packages/mdx) and a set of [primitive UI components](/packages/components).
8+
However, if you would prefer a minimal installation, you can instead start with the `@theme-ui/core` package. For more information, see the [core package documention](/packages/core).
9+
10+
## Setup
11+
12+
#### 1. Install Theme UI:
813

914
```sh
1015
npm i theme-ui
1116
```
1217

13-
Create a theme object to include custom color, typography, and layout values.
18+
#### 2. Create a theme object
19+
Include custom color, typography, and layout values:
1420

1521
```js
1622
// example theme.js
@@ -34,7 +40,9 @@ If you're using Gatsby, see the [Getting Started with Gatsby](/getting-started/g
3440

3541
</Note>
3642

37-
Add the theme to your application with the `ThemeProvider`, passing in the `theme` object as a prop.
43+
#### 3. Add the theme to your application
44+
45+
Using the `ThemeProvider`, pass in the `theme` object as a prop:
3846

3947
```jsx
4048
// basic usage
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "@theme-ui/components"
3+
---
4+
5+
import Readme from '@theme-ui/components/README.md'
6+
7+
<Readme />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "@theme-ui/core"
3+
---
4+
5+
import Readme from '@theme-ui/core/README.md'
6+
7+
<Readme />

packages/docs/src/pages/packages/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ In addition to the core library, Theme UI includes several optional packages.
1111

1212
<Cards width={320}>
1313

14-
- [@theme-ui/components](/components)
14+
- [@theme-ui/core](/packages/core)
15+
- [@theme-ui/components](/packages/components)
1516
- [@theme-ui/presets](/packages/presets)
1617
- [@theme-ui/prism](/packages/prism)
1718
- [@theme-ui/color](/packages/color)

packages/docs/src/sidebar.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
- [IconButton](/components/icon-button)
4949
- [MenuButton](/components/menu-button)
5050
- [Packages](/packages)
51+
- [@theme-ui/core](/packages/core)
52+
- [@theme-ui/components](/packages/components)
5153
- [@theme-ui/presets](/packages/presets)
5254
- [@theme-ui/prism](/packages/prism)
5355
- [@theme-ui/color](/packages/color)

0 commit comments

Comments
 (0)