Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fileverse-dev/ddraw

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fileverse-dev/ddraw

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.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Ddraw Editor

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.

Repository Structure

  • /package: Contains the package code for the Ddraw Editor component
  • /: Root directory contains example and demo source code

Features

  • Customizable drawing interface
  • Optional preview mode
  • Customizable toolbar
  • Built on top of Tldraw for robust drawing capabilities
  • Responsive design with mobile support

Installation

To use the Ddraw Editor in your project, you'll need to install it along with its dependencies:

Prequisites

  • You should be using tailwindcss and it must have tailwind configuration

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

Package last updated on 17 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc