Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@fileverse-dev/ddraw
Advanced tools
Ddraw Editor is a powerful and customizable drawing editor built on top of the Tldraw library. This repository contains both example/demo source code and the package code for the Ddraw Editor component.
Ddraw Editor is a powerful and customizable drawing editor built on top of the Tldraw library. This repository contains both example/demo source code and the package code for the Ddraw Editor component.
/package
: Contains the package code for the Ddraw Editor component/
: Root directory contains example and demo source codeTo use the Ddraw Editor in your project, you'll need to install it along with its dependencies:
import { DdrawEditor } from '@fileverse-dev/ddraw'
import '@fileverse-dev/ddraw/styles'
in App.jsx/App.tsx
In your tailwind config, add this line to content array
@fileverse-dev/ddraw/dist/index.es.js
That's it, you should be able to use DdrawEditor now
## Props
The `DdrawEditor` component accepts the following props:
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `renderNavbar` | `(editor: Editor) => React.ReactNode` | `undefined` | Optional function to render a custom navbar. |
| `onChange` | `(snapshot: TLSnapshot) => void` | `undefined` | Callback function called when the drawing changes. |
| `isPreviewMode` | `boolean` | `false` | Enables read-only preview mode when true. |
| `snapshot` | `TLSnapshot` | `undefined` | Initial snapshot to load into the editor. |
## Customization
### Custom Navbar
You can provide a custom navbar by passing a function to the `renderNavbar` prop:
FAQs
Ddraw Editor is a powerful and customizable drawing editor built on top of the Tldraw library. This repository contains both example/demo source code and the package code for the Ddraw Editor component.
We found that @fileverse-dev/ddraw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.