2023-04-25 11:01:25 +00:00
< div alt style = "text-align: center; transform: scale(.5);" >
< picture >
2023-10-06 12:10:33 +00:00
< source media = "(prefers-color-scheme: dark)" srcset = "https://github.com/tldraw/tldraw/raw/main/assets/github-hero-dark.png" / >
< img alt = "tldraw" src = "https://github.com/tldraw/tldraw/raw/main/assets/github-hero-light.png" / >
2023-04-25 11:01:25 +00:00
< / picture >
< / div >
# @tldraw/tldraw
2023-10-06 12:10:33 +00:00
This is the pre-release version of [tldraw ](https://github.com/tldraw/tldraw ).
See the pre-release docs at [canary.tldraw.dev ](https://canary.tldraw.com ).
2023-04-25 11:01:25 +00:00
## Installation
2023-10-06 12:10:33 +00:00
Install the `@tldraw/tldraw` package using `@canary` for the latest canary release. (Or `@alpha` for the latest alpha release.)
2023-04-25 11:01:25 +00:00
```bash
2023-10-06 12:10:33 +00:00
yarn add @tldraw/tldraw@canary
2023-04-25 11:01:25 +00:00
# or
2023-10-06 12:10:33 +00:00
npm install @tldraw/tldraw@canary
2023-04-25 11:01:25 +00:00
# or
2023-10-06 12:10:33 +00:00
pnpm i @tldraw/tldraw@canary
2023-04-25 11:01:25 +00:00
```
Then start the local development server.
```bash
yarn dev
# or
npm run dev
# or
pnpm dev
```
## Usage
An extremely minimal usage (without our UI) might look like this:
```tsx
import { Tldraw } from '@tldraw/tldraw'
2023-10-06 12:10:33 +00:00
import '@tldraw/tldraw/tldraw.css'
2023-04-25 11:01:25 +00:00
export default function () {
return < Tldraw / >
}
```
2023-10-06 12:10:33 +00:00
See the [examples folder ](https://github.com/tldraw/tldraw/tree/main/apps/examples ) for more examples.
2023-04-25 11:01:25 +00:00
## License
2023-05-04 12:47:56 +00:00
The source code in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at [hello@tldraw.com ](mailto://hello@tldraw.com ).