2024-01-15 12:33:15 +00:00
---
2024-02-12 09:53:11 +00:00
title: Quick Start
2024-01-15 12:33:15 +00:00
status: published
author: steveruizok
date: 3/22/2023
order: 0
---
2024-02-12 09:53:11 +00:00
<h2>Add a tldraw canvas to your React app in just 5 minutes.</h2>
2024-02-29 18:12:16 +00:00
You can use the tldraw SDK to craft infinite canvas experiences for the web. It's perfect for collaborative whiteboards but you can use it for lots of other things, too.
2024-02-12 09:53:11 +00:00
2024-03-11 14:08:04 +00:00
By the end of this guide you will have made something that looks like this:
2024-02-12 09:53:11 +00:00
2024-02-29 16:28:45 +00:00
<Embed className="article__embed--quickstart" src="https://examples.tldraw.com/develop" />
### 1. Installation
- Set up a React project however you normally do. [We recommend Vite](https://vitejs.dev/guide/#scaffolding-your-first-vite-project).
- Install the tldraw library using this command:
```bash
2024-02-29 18:12:16 +00:00
npm install tldraw
2024-02-29 16:28:45 +00:00
```
### 2. Import Styles
To import fonts and CSS for tldraw:
- Create or edit a css file called `index.css`
- Copy and paste this into the file:
```CSS
2024-04-10 12:46:55 +00:00
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap");
2024-02-29 18:12:16 +00:00
@import url("tldraw/tldraw.css");
2024-02-29 16:28:45 +00:00
body {
font-family: "Inter";
}
```
### 3. Render Tldraw Component
To render the Tldraw component
2024-02-29 18:12:16 +00:00
- Import the `<Tldraw />` component from the tldraw` package
2024-02-29 16:28:45 +00:00
- Import the `index.css` CSS file from earlier
- Wrap the Tldraw component in a `<div>` element with the style attribute set to: `{ position: 'fixed', inset: 0 }`
This will render a full screen canvas:
```javascript
2024-03-11 14:08:04 +00:00
import { Tldraw } from 'tldraw'
import './index.css'
2024-02-29 16:28:45 +00:00
export default function App() {
2024-03-11 14:08:04 +00:00
return (
<div style={{ position: 'fixed', inset: 0 }}>
<Tldraw />
</div>
)
2024-02-29 16:28:45 +00:00
}
```
## Next Steps
2024-03-11 14:08:04 +00:00
Now that you have your canvas working, you may be wondering: what next?
2024-02-29 16:28:45 +00:00
2024-03-11 14:08:04 +00:00
You can try:
2024-02-12 09:53:11 +00:00
- Giving the editor a makeover by [customizing the UI](/docs/user-interface)
- Adding your own [shapes](/docs/shapes) and [tools](/docs/tools)
2024-03-11 14:08:04 +00:00
- Providing collaboration using [multiplayer](https://github.com/tldraw/tldraw-yjs-example)
2024-02-12 09:53:11 +00:00
2024-02-29 16:28:45 +00:00
We provide the above examples and more in our [examples section](/examples). Go build something creative and please do share it with us in our [#show-and-tell](https://discord.com/invite/SBBEVCA4PG) channel on Discord!