tldraw/apps/examples
Lu Wilson 016dcdc56a
Add inline behaviour example (#3113)
This PR adds an example demonstrating some common practices for using
tldraw as an inline block. For example, in Notion-like applications.
This includes:

- Making sure that only one editor has focus at a time.
- Always defaulting to the hand tool when you click into an editor.
- Deselecting everything when an editor loses focus.
- Hiding the UI when an editor is not focused.
- Disabling edge scrolling by default.
- Using a stripped down UI to make the most of the available space.
- Removing actions from the context menu to match the stripped down UI.

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Try out the **Inline behavior** example.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Docs: Added an example for inline behaviour.
2024-03-25 11:57:54 +00:00
..
e2e PDF editor example (#3159) 2024-03-19 11:55:21 +00:00
public Add custom tool examples (#3064) 2024-03-05 09:27:53 +00:00
src Add inline behaviour example (#3113) 2024-03-25 11:57:54 +00:00
.gitignore feat: add new prop to force mobile mode layout (#1734) 2023-11-11 14:11:59 +00:00
LICENSE.md Change licenses to tldraw (#2167) 2023-12-19 10:41:01 +00:00
package.json Revert perf changes (#3217) 2024-03-21 10:05:44 +00:00
README.md Fix trademark links (#2380) 2023-12-26 09:22:04 +00:00
tsconfig.json Check tsconfig "references" arrays (#2891) 2024-02-21 13:07:53 +00:00
vercel.json Restore vercel.jsons (#2650) 2024-01-25 23:24:22 +00:00
vite.config.ts PDF editor example (#3159) 2024-03-19 11:55:21 +00:00

@tldraw/example

Community

Have questions, comments or feedback? Join our discord or start a discussion.

Distributions

You can find tldraw on npm here.

Contribution

Please see our contributing guide. Found a bug? Please submit an issue.

License

The tldraw source code and its distributions are provided under the tldraw license. This license does not permit commercial use.

If you wish to use this project in commercial product, you need to purchase a commercial license. Please contact us at hello@tldraw.com for more inforion about obtaining a commercial license.

Trademarks

Copyright (c) 2023-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.

Contact

Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.