DrawFiddle guide

This guide explains everything you can do on DrawFiddle. The names of buttons and menus are written exactly as you see them on the site. Use your browser search to find any button name on this page.

1. What DrawFiddle is

DrawFiddle is where you create drawn UI you can use: widgets you publish on the web, and drawn snippets that you put into your own app, in any framework DrawnUI supports. It is also a playground to learn DrawnUI quickly and, in .NET, drawing with SkiaSharp.

Create widgets and publish them

Make a chart, a price card, a product configurator, a small game or an animated banner. Then publish it on the web:

Create snippets for your app

The code you write here runs without changes in every framework DrawnUI supports. Export it as a ready project (chapter 11), or copy it into your own app:

.NET MAUIAndroid, iOS, macOS and Windows apps
WPFWindows desktop apps
OpenTKDesktop apps on Windows and Linux
Blazor WebAssemblyWeb apps with Blazor
.NET WebAssemblyWeb apps in .NET, without Blazor
ReactWeb apps, with DrawnUI for React

DrawnUI draws every control itself with Skia. So your UI looks the same in all of them.

A playground to learn DrawnUI and SkiaSharp

You do not install anything and you do not create a project. Open a sample and change a line. The result updates while you type. You get code completion and error hints, like in your IDE. The samples show layouts, long lists, shaders, animations, text editing and data from the web.

For .NET developers it is also an easy way to practise SkiaSharp drawing. The Raw sample draws on a plain SkiaSharp canvas. The SKSL sample lets you change a shader and see the result immediately.

You can write in C#, React (TSX), Rust or NX. The controls and their names are the same in all four. Writing, sharing, embedding and exporting are free. Rust compiles on our server, so it needs a free account (chapter 6). Premium adds standalone web apps (chapter 17).

2. Quick start

  1. Open drawfiddle.com/app. Or press Create with .NET, Create with React, Create with Rust or Create with NX on the home page.
  2. Wait until the text next to the toolbar says Compiler ready. The Welcome sample appears on the right.
  3. Change something in the code, for example a text or a colour. The result updates by itself when the code has no errors. You can also press ▶ Run or Ctrl+S. In Rust, the result updates only when you press ▶ Run or Ctrl+S.
  4. Try other samples with the buttons above the code.
  5. To save your work, open Export Web and choose Share as Fiddle. A link is copied. Anyone who opens it sees your code and the result. If you are signed in, the fiddle is also saved in Account → My fiddles.

3. The editor

The editor is at drawfiddle.com/app. An address like /app/weather or /app/cells opens the editor with that sample.

Samples

The row of buttons above the code loads the samples of the current language. In C# they are: Welcome, UI, Effect, Cells, Kids, Looks, Spinner, Editor, Data I/O, Weather, Glass, Custom, SKSL and Raw. React, Rust and NX have their own samples. Many of them do the same thing as a C# sample. You can change a sample as much as you want. The original does not change.

When you open a fiddle from a link, this row shows two other buttons: ← Home (back to the Community) and Presets (back to the samples).

Description, tags and params

Code and canvas

The code is on the left. The canvas, where your code draws, is on the right. Drag the line between them to change their width. Drag the handle below them to change the height. On a small screen (less than 900 pixels wide) the code is above and the canvas is below.

Click the canvas to send the keyboard to your app. Then the arrow keys, Space, Page Up, Page Down, Home, End and Tab go to your app (for example a text field or a game). They no longer scroll the page. Click the code to send the keyboard back to the code.

The toolbar, from left to right

▶ RunCompiles and draws your code. While it works it shows Loading compiler… or Compiling…. Ctrl+S (Cmd+S on a Mac) does the same.
💾 Save changesYou see it when you change a fiddle that you shared yourself. It saves the new code under the same link. The link, the Community card and the ratings stay. If the fiddle is in the Community, it goes back to review, because the code changed. See chapter 12.
↶ UndoYou see it after a save. It brings back the code from before the save.
C# · TSX · Rust · NXThe language of your code. When you change the language, the editor loads the first sample of the new language.
IntelliSenseCode completion, hints and red lines under errors. If typing feels slow, turn it off.
HotReloadRuns your code again after every change, when it has no errors. It needs IntelliSense on. Not shown for Rust.
Export WebShare, embed and save images. See chapter 9.
Export .NETOnly for C#. Download a ready project for MAUI, WPF, OpenTK (Windows, Linux), Blazor WASM or .NET WASM. See chapter 11.
Export ComponentOnly for TSX. Download your component, or a full Vite + React project.
Export RustOnly for Rust. Download a ready project for Web, Windows, Linux, Android, iOS or all platforms. See chapter 11.
★ PremiumOnly for Premium accounts. Publish a standalone app. See chapter 17.
Colour circleThe background colour of the canvas. It is saved with the fiddle and goes into exported projects.
GesturesLock or Enabled. It decides what happens when a finger drags on the canvas: your app moves, or the page scrolls. It is saved with the fiddle. See chapter 21.
StatusWhat just happened, for example Compiler ready, ✓ Compiled and rendered, ✗ 3 errors, or the result of your last share or export.

Errors and the console

Compile errors are listed in red under the toolbar. The same errors are underlined in the code.

The Console at the bottom shows what your code prints: Console.WriteLine in C#, console.log in TSX, println! in Rust, a Log action in NX. It also shows Fiddle.Emit events (⚡), Fiddle.Open requests (↗) and failed Fiddle.Load calls (⚠), see chapter 19. Clear empties the console.

4. Writing C#

Your code is the inside of a method that returns the control to draw. You do not write a class, a namespace or using lines:

return new SkiaLabel { Text = "Hello", TextColor = Colors.White,
                      HorizontalOptions = LayoutOptions.Center };

5. Writing React (TSX)

Choose TSX in the language switch. Your browser compiles the TSX code. It is drawn by DrawnUI for React, which is the same engine written in TypeScript. The controls, their properties and the layout rules are the same as in C#.

DrawnUI for React has layouts, scrolling lists, labels, shapes, images, SVG, buttons, switches, sliders, progress bars, carousels, drawers, text editors, animations, Lottie and gestures. You can see them at helloreact.drawnui.net. In your own project, install it with npm i drawnui-react.

6. Writing Rust

Choose Rust in the language switch. Your code is drawn by DrawnUI for Rust, which is the same engine written in Rust. The controls, their properties and the layout rules are the same as in C#.

use drawnui::prelude::*;

#[derive(Default)]
struct App {
    count: i32,
}

fn build(_app: &mut App) -> Build<SkiaLayout> {
    SkiaLayout::column().spacing(12).children((
        SkiaLabel::new("").font_size(20).text_color(Color::WHITE)
            .observe(|me, app: &App| me.set_text(format!("Clicked {}", app.count))),
        SkiaButton::new("Click me").on_tapped(|_me, app: &mut App, _cx| app.count += 1),
    ))
}

DrawnUI for Rust has layouts, scrolling lists, labels, shapes, images, buttons, switches, sliders, carousels, text editors, animations, shaders and gestures. You can see them at hellorust.drawnui.net. In your own project, add the drawnui crate from crates.io.

7. Writing NX

NX is a separate language. It is not C# and not TypeScript. Your browser compiles it, and it draws with the same engine as TSX. The language is described at nx-lang.github.io/nx. Here is how it works on DrawFiddle.

action Log = { text:string }

component <App /> = {
  state { taps:int = 0 }

  <SkiaButton Text={"Tapped " + taps + " times"}
              onTapped=<Update taps={taps + 1} /> />
}

<App />

8. Your files: Resources

The Resources panel under the code holds files that your code can use: images, Lottie .json animations, .sksl shaders, .svg files and fonts (.ttf, .otf). Press + Add file. Then use the file name in your code, for example Source = "logo.png". A font has two names, with and without the extension: FontFamily = "MyFont" or FontFamily = "MyFont.ttf". The × on a file removes it. The code runs again after you add or remove a file.

9. Export Web: share your fiddle

The Export Web menu has everything to share your fiddle or put it on a page. All of it is free. If you are signed in, what you create is also added to your account (chapter 16).

⧉ Copy source codeCopies the code. Nothing is uploaded.
🔗 Share as FiddleUploads the code and copies a short link: drawfiddle.com/f/<id>. The link opens the code in the editor, with the result. In chats it shows a picture of your canvas. The same code always gets the same link.
🔗 Share as AppCopies drawfiddle.com/p/<id>: only the canvas, full screen, without the editor.
▶ Run as AppOpens that page in a new tab. If your browser blocks it, the status line shows a link to click.
🖼 Embed canvas as iframeOpens a test page. It shows your fiddle inside a frame and the HTML code to put on your website. ⧉ Copy HTML copies it. See chapter 20.
🖼 Embed source code as iframeThe same, but for a page that shows your code in colour, read-only. It opens very fast.
🖼️ Download snapshot (JPG)Saves a picture of the canvas, at its full size, as a JPEG file. Nothing is uploaded.
🖼️ Download snapshot (PNG)The same as a PNG file. PNG keeps the full quality and transparency.
📷 Download sharing preview (JPG)Shares the fiddle and copies a link to its preview picture (1200×630). This is the picture that chats and social networks show. You can use the link in a README or a message.
🔄 Update thumbnailYou see it on a fiddle you shared yourself. It takes a new preview picture of the canvas. The link stays the same. If you changed the code after sharing, share it again instead: new code gets a new link.

While the link is created, the menu shows Creating your short link…. Then the status line shows the result, for example ✓ Link copied: drawfiddle.com/f/….

You can open one fiddle with several types of links. The id is the same in all of them.

LinkWhat people seeWho can create it
/f/<id>The editor with the code (read-only) and the result. In chats, a card with a picture and the description.Everyone: Share as Fiddle
/p/<id>Only the canvas, full screen. The browser compiles the code, or loads the saved result. A small ⚡ Made with DrawFiddle label links to the code.Everyone: Share as App
/c/<id>The code as a simple page, with ▶ Run and Edit in Fiddle. /c/<id>.md gives the same as markdown.Everyone: Embed source code as iframe
/a/<id>/A published standalone app: no editor, no compiler, no label.Premium, chapter 17
live.fiddle.drawnui.net/x/<id>A server app: our server draws it and sends the picture.Premium, chapter 18
/show/<id>The card of the fiddle on the Community page.Fiddles in the Community

/f/, /p/ and /c/ always use the current DrawnUI version of the site. /a/ and /x/ keep the version they were built with. See chapter 22.

11. Export to a project

Your browser creates the project from a starter template and downloads it as a .zip file. Nothing is uploaded.

Export .NET (C#)

Type a Project name at the top of the menu. It becomes the name of the .csproj file. The editor remembers it for next time. Then choose the target:

MAUIAndroid, iOS, Mac, Windows
WPFWindows desktop
OpenTK WindowsOpenGL window on Windows
OpenTK LinuxOpenGL window on Linux (x64 and arm64)
Blazor WASMBrowser app with Blazor
.NET WASMBrowser app without Blazor

You get the file <name>-<target>.zip. Your code is inside, in the method CreateMainContent(). Your Resources files, the canvas colour and the Gestures setting are inside too. Open the project in Visual Studio or Rider, or run dotnet run. The project uses the DrawnUI NuGet packages, with the same version as the site.

If your code uses the Fiddle API (Fiddle.Query, Fiddle.Load, Fiddle.Emit), you cannot export it: these calls work only in the browser. Remove them first. The status line tells you.

Export Component (TSX)

Export Rust

Type a Project name at the top of the menu. It becomes the name of the app and of its crate. Then choose the target:

WebBrowser app. Needs Emscripten.
WindowsWindows desktop app
LinuxLinux desktop app (X11 and Wayland)
AndroidAndroid app (APK). Needs the Android SDK and NDK.
iOSiPhone and iPad app. Needs a Mac with Xcode.
All platformsOne project with all the targets above, and macOS.

You get the file <name>-<target>.zip. Your code is inside, in src/app.rs. The canvas color, the fonts of the fiddle and your Resources files (in assets/) are inside too. README.md has the commands to build and run it. The project uses the drawnui crate from crates.io, with the same version as the site. Skia comes with it: the first build downloads it.

12. Open a fiddle from someone else

A /f/ link, or Code on a Community card, opens the fiddle in the editor in view mode. You can read the code but not change it, and it runs immediately. Instead of the toolbar you see:

Change a fiddle you shared

Open it and press ✎ Edit. Change the code. Press 💾 Save changes. The link stays the same. The Community card and the ratings stay too. People see the new code. If the fiddle is in the Community, it goes back to review, because the code changed. ↶ Undo brings back the code from before.

If you press Share as Fiddle instead, the new code gets a new link.

13. The Community

The home page, drawfiddle.com, shows fiddles that people added to the Community.

A card shows a picture, the title, the description, the tags, the language, the rating and the author. Click a card to open it:

CodeOpens the code in the editor. Your browser compiles it.
▶ RunRuns it in a new tab. If the author published it as an app, this opens the app, which starts faster.
ShareCopies the link of the fiddle. Nothing is added to your account.
StarsYour vote, from 1 to 5. You must be signed in. Click your vote again to remove it.
ReportTells a moderator that the fiddle breaks the Terms. You can add a note.
RemoveOnly for the author: removes the fiddle from the Community page.
‹ ›Previous and next card. The ← and → keys do the same. Esc closes the card.

Add your fiddle to the Community

  1. Sign in. Write a description, add tags, and share the fiddle (Export Web → Share as Fiddle).
  2. Open Account → My fiddles. Press Submit to Community on the fiddle. It shows In review.
  3. A moderator checks it. When it is accepted, it shows Community, and it appears on the home page. If it is not accepted, the label shows the reason. Change the fiddle and press Resubmit.

While it waits, you can press Withdraw. After it is listed, you can press Unlist at any time. The Contribute button on the home page shows the same steps.

14. Tags

A fiddle can have up to 5 tags. A tag has 2 to 20 characters: letters, numbers and dashes, for example chart, dashboard, game-2d. Type them in the Tags field before you share. Put a comma or a space between them. Later the author can change them on the Community card with Edit tags. The home page shows the most used tags above the cards.

15. Your account

You do not need an account to write, run, share, embed or export. An account gives you more. Everything you share is saved in one list. You can add fiddles to the Community and vote. You can use your account on all your devices.

Sign in

Press Login in the top bar. There are two ways to sign in:

You stay signed in for 30 days in that browser. We save only your email address. We never save your name or picture from Google. After too many wrong codes, or too many code requests, you must wait before you try again.

The Account tab

EmailThe address you signed in with. Nobody else can see it.
Display nameThe name the Community shows on your fiddles: 2 to 24 letters, numbers, spaces or _ - ., without @. Press Save. Leave it empty to stay anonymous.
Planfree or premium, and the end date.
Member sinceThe date you signed in the first time.
RefreshLoads your account details again, for example after your plan changed.
Sign outSigns you out in this browser.
Delete accountDeletes your account, your lists, your Community fiddles, your votes and your published apps. The links you shared still work until they expire, because they do not contain your name or email. You cannot undo this.

Premium accounts also have a Usage tab. It shows the storage you use, your published apps and your publishes this month, each with its limit.

16. My fiddles and My apps

Two tabs in your account list what you created while signed in:

Did someone send you a link? Paste it (or only its id) in the field at the top and press Add. It is then saved in your list.

The buttons above the list are filters: All, Community, In review, and with Premium also Pinned, Published and AOT. Each one shows a number.

What each line shows

Buttons on each line

OpenIn My fiddles: opens the code in the editor.
RunIn My apps: opens the /p/ page.
Open codeIn My apps: opens the code of the app in the editor.
Copy linkCopies the /f/ link (fiddles) or the /p/ link (apps).
Submit to CommunitySends the fiddle to review. Then the label shows In review, with Withdraw. When it is accepted: Community, with Unlist. When it is not accepted: Not accepted (point at it to see why), with Resubmit.
☆ PinPremium. The link is never deleted, even without visits. It shows ★ Pinned. Free links are deleted after 60 days without visits.
Publish appPremium. Builds a standalone app from this fiddle. After that it shows Republish, and Building… during the build. (AOT) and Publish server build the other two types (only C#). See chapter 17.
RemoveRemoves it from your list. The link still works.

17. Premium: publish an app

When someone opens a fiddle link, even /p/, their browser first downloads the compiler and compiles your code (or loads the saved result). A published app is different. We build your fiddle one time, in advance, into a standalone web app with its own address. The visitor downloads only your code, DrawnUI and the drawing engine. There is no editor, no compiler and no label. It starts faster. Use it for your customers or on a product page.

Premium accounts see ★ Premium in the toolbar and Publish app in their lists. At the moment we give Premium by request: write to [email protected].

Three types of app

OptionWhat we buildAddressBest for
🚀 Publish pre-compiled app (WASM)A small .NET WebAssembly app (about 9 MB). The build takes about 4 minutes. For TSX there is no build: it is online in a few seconds.drawfiddle.com/a/<id>/Most apps and UI
🚀 Publish pre-compiled AOT app (WASM)The same, compiled to native WebAssembly code (about 15 MB, about 8 minutes). Only C#.drawfiddle.com/a/<id>/Code that does a lot of calculation: physics, particles, big loops
🚀 Publish pre-compiled app (Server-Side)Your code runs on our server. The visitor gets the picture as a stream. Online in about one second. Only C#.live.fiddle.drawnui.net/x/<id>Charts, dashboards, widgets for slow devices. See chapter 18

During the build

After you choose an option, the status line shows ✓ Building — a few minutes. Track it in Account → My apps. A React app or a server app shows ✓ Live now immediately, with the links ▶ open app and ⧉ embed HTML. You can continue working, or close the tab.

In My apps the app shows building…, and the list updates by itself. When the build is done, it shows published. If the build fails, it shows failed and the reason. Fix the code and press Rebuild.

Some code cannot be built in advance, for example reflection or code that creates code while it runs. In that case you get a clear message right away, and nothing is published.

Your published apps

Account → My apps starts with Published standalone apps. For each app:

OpenOpens the app in a new tab.
EmbedShows the app inside a frame, and the HTML code to put on your website. See chapter 20.
Download zipDownloads the app files. You can put them on any web server.
Open codeOpens the code of the app in the editor.
Open liveServer apps: opens the live address.
RebuildBuilds the app again, with the current code of the fiddle and the current DrawnUI version. The address stays the same.
Rebuild (AOT)The same, as an AOT build. Not for React.
UnpublishDeletes the app. The fiddle stays.

Only My apps links to your published app. The /f/ link, the /p/ link and ▶ Run in the editor always compile the code in the browser. The ▶ Run button on a Community card opens the published app, if there is one.

Keep the slash at the end

Use drawfiddle.com/a/<id>/, not drawfiddle.com/a/<id>. Without the last slash, the browser needs one extra step before it starts to download the app. This adds about half a second on a slow connection, on every visit. The HTML from Embed already has the slash. Check the links you type yourself.

Limits

Premium includes 10 published apps, 300 MB of storage and 30 publishes per month. The Usage tab shows how much you use. Apps with the same DrawnUI version share the engine files, so your second app loads faster than the first.

18. Server apps

Publish pre-compiled app (Server-Side) compiles your fiddle on our server in about one second. It also draws the first picture immediately, so the link works for the first visitor. Some code is not allowed in server apps. In that case you get a clear error, and nothing is published.

Then the app runs on our server. The visitor gets a stream of pictures, like a video that reacts to taps. The visitor downloads nothing, so the page opens in less than one second, even on old phones. We send pictures only when something changes (an animation, a tap, an image that loads). So an app that does nothing uses no data. The maximum is 30 pictures per second. Each visitor gets their own copy of the app.

Address options: ?w=800&h=500 sets the canvas size in pixels. &fps=15 sets the maximum pictures per second (1 to 30). &embed=1 shows only the picture, for embedding. &debug=1 shows the speed and the data used. Other parameters go to your code through Fiddle.Query.

Put a server app on your website: Embed in My apps gives you the HTML. Our server draws the app in the size of the frame, so the same code works on any page:

<div style="max-width:800px; aspect-ratio:800/500">
  <iframe src="https://live.fiddle.drawnui.net/x/<id>?embed=1"
          style="width:100%;height:100%;border:0;border-radius:12px" loading="lazy"></iframe>
</div>

19. Data in, events out

Three simple calls connect a C# fiddle to other websites and data. The same code works in the editor, on the /p/ page, in a published app and in a server app.

Values from the address…?city=London&plan=pro → Fiddle.Query.Text("city"). Another address gives other values. In the editor, type them in the Params field.
Load dataFiddle.Load(url, json => …) loads JSON from a public address and gives it to your code.
React to tapsFiddle.Open(url) sends the visitor to another page. Fiddle.Emit("buy", data) tells the web page around the app what happened.

Values from the address

var city  = Fiddle.Query.Text("city", "Belgrade");   // ?city=London
var count = Fiddle.Query.Int("count", 5);             // Int / Double / Bool / Text / Csv / List, with default values
var xs    = Fiddle.Query.Csv("values");               // ?values=3,5,8 → [3, 5, 8]

The person who creates the address chooses the values: a link, your web page or your server.

Load data

Your code does not use the network directly. A server app has no network at all. Your code asks the host. The host loads the data and gives the JSON to your code:

Fiddle.Load("https://api.open-meteo.com/v1/forecast?latitude=51.5&longitude=-0.1&current=temperature_2m",
    j => { temp.Text = j.GetProperty("current").GetProperty("temperature_2m").GetDouble() + "°"; temp.Update(); },
    err => { temp.Text = err; temp.Update(); });

Rules: only https, only public addresses, up to 256 KB and 5 seconds per request. We keep each result for 60 seconds, so a thousand visitors of the same chart need only one request. Up to 32 requests at the same time. In the editor and on the /p/ page, the browser loads the data, so the other website must allow it (CORS). The Weather sample shows a full example.

When the visitor taps

new SkiaButton("Buy Pro").OnTapped(me =>
{
    Fiddle.Emit("buy", new { plan = "pro", price = 9 });   // send an event (JSON, up to 4 KB)
    Fiddle.Open("https://example.com/checkout?plan=pro");  // or: send the visitor to another page
});
window.addEventListener('message', e => {
  if (!e.data || !e.data.fiddle) return;          // { fiddle: "buy", app: "<id>", data: { plan: "pro", price: 9 } }
  if (e.data.fiddle === 'buy')  openCheckout(e.data.data.plan);
  if (e.data.fiddle === 'open') location.href = e.data.url;   // Fiddle.Open: go there only if you want
});

The Data I/O sample shows this: price cards that take the plan and the currency from the address, and a buy event on each button. In the editor the events appear in the console. Limits: 20 events per second per visitor, 4 KB per event, up to 64 address parameters of up to 2 KB each. Exported .NET projects do not include the Fiddle API (chapter 11).

20. Put a fiddle on your website

Export Web → Embed canvas as iframe opens a test page. It shows your fiddle inside a frame, the HTML code below it, and ⧉ Copy HTML. The HTML looks like this:

<iframe src="https://drawfiddle.com/p/<id>" width="600" height="400"
        style="border:0;border-radius:12px" loading="lazy"></iframe>

You can change the size. The fiddle adapts to the frame. A /p/ frame loads the engine first: a few MB for C#, much less for React, Rust and NX, and the browser keeps it for the next visit. For a lighter frame, use a published app (chapter 17) or a server app, and their Embed button. Embed source code as iframe puts your code on the page instead of the app.

Is the frame on a long page that people scroll on a phone? Set Gestures to Enabled. Otherwise a finger on the frame cannot scroll the page (chapter 21).

Know when the frame has drawn

The load event of the frame comes before anything is drawn. So the app sends a message to your page when the first picture is on the screen. It sends it one time. Show the frame when this message comes, and your page never shows an empty box:

window.addEventListener('message', e => {
  if (e.origin !== 'https://drawfiddle.com' || !e.data || e.data.fiddle !== 'ready') return;
  document.getElementById('my-widget').style.opacity = '1';   // show the frame, hide your placeholder
});

Sometimes the first picture is not complete yet, for example when a photo or data is still loading. Then stop the message and send it yourself later. The message goes out after the next picture:

Fiddle.HoldReady();   // in C# and TSX, while you build the UI
// ... later, when your content has arrived:
Fiddle.Ready();

The /p/ page (C#, React and NX) and published apps send "ready". HoldReady works on the /p/ page and in published React apps. A published C# app sends "ready" after its first picture. The editor never sends it. In exported projects the two calls do nothing.

21. Gestures and page scroll

The Gestures setting in the toolbar decides what happens when a finger drags on the canvas: your fiddle moves, or the page scrolls.

The setting is saved with the fiddle, like the background colour. Fiddles shared before this setting existed use Lock. The setting works in the editor immediately, on the /p/ page after you share, in published apps after Rebuild, and in exported projects.

To change it on a fiddle you already shared: open it, press ✎ Edit, choose the setting, press 💾 Save changes (the link stays the same). If you published an app from it, press Rebuild. When you load a sample, the setting goes back to Lock.

22. Which DrawnUI version runs

We update the site when a new DrawnUI version comes out. A fiddle contains only code. So:

23. Limits

24. Keyboard

Ctrl+S / Cmd+SRun the code (in the code editor).
Click the canvasThe arrow keys, Space, Page Up, Page Down, Home, End and Tab go to your fiddle. Click the code to get them back.
← →Previous and next card on the Community page.
Enter / EscSave or cancel tags on a card.
EnterSend the sign-in code. Add a pasted link to your list.
EscClose a Community card, the account window, the About window, the Contribute window and the update window.

25. For AI agents and scripts

When the editor is loaded, it has a small JavaScript API on window.fiddle, for automation (for example Playwright or an AI agent):

await fiddle.getState()        // { ready, running, status, errors }
await fiddle.setCode(code)     // replace the code in the editor
await fiddle.run()             // compile and draw: { success, errors, status }
await fiddle.getConsole()      // what the code printed
await fiddle.listPresets()     // [{ slug, name }]
await fiddle.loadPreset(slug)  // load and run a sample

To get the pixels of the canvas, take a screenshot of .fiddle-canvas canvas. You cannot read the WebGL canvas with toDataURL.

Connect an AI assistant (MCP)

The site has an MCP server. With it, an AI assistant can search the Community, read the code of any fiddle and share its own code. You do not need an account or a key. Add it to Claude Code with:

claude mcp add --transport http drawnui-fiddle https://drawfiddle.com/mcp

Or, in a tool that uses a JSON config:

{ "mcpServers": { "drawnui-fiddle": { "type": "http", "url": "https://drawfiddle.com/mcp" } } }

Tools: search_snippets, get_source, create_fiddle, get_preview. The server card is at /.well-known/mcp/server-card.json.

Text and markdown versions

Pages that have a text version give it to you. Ask for text/markdown, or add .md to the address:

https://drawfiddle.com/index.md        the whole Community
https://drawfiddle.com/show/{id}.md    one fiddle: description, links, code
https://drawfiddle.com/c/{id}.md       only the code
https://drawfiddle.com/openapi.json    the public API for reading
https://drawfiddle.com/llms-full.txt   this guide and the DrawnUI skills in one file

26. Questions and answers

Why is the first download so big? For C#, your browser gets a real C# compiler and the .NET runtime. This happens only once. After that the browser keeps them. The home page also loads them in the background while you look at the Community. React, Rust and NX fiddles are much smaller.

Is my code sent to a server? In C#, React and NX, not while you work: your browser compiles it. Rust code goes to our server when you press ▶ Run, because a browser cannot compile Rust. Your code is uploaded only when you share or publish it, so that the link can show it. Exports and pictures are made in your browser.

I changed my fiddle, but the link shows the old code. A link always shows the code it was created with. New code gets a new link. To keep the same link, use ✎ Edit and 💾 Save changes (chapter 12).

My published app does not show my changes. A published app keeps the code and the DrawnUI version from its build. Press Rebuild in My apps (chapter 22).

My app is slow. What can I do? In the editor, the first run after a change also compiles. That is normal. If the drawing itself is slow: cache parts that do not change (UseCache), do not create controls again on every frame, and use effects (shaders, blur, shadows) only on small areas. For a published app with a lot of calculation, use Publish pre-compiled AOT app (WASM). It is much faster for that kind of code. The normal build is best for normal UI.

Why is my server app not as smooth as a local app? Our server draws it and sends the pictures over the network. The maximum is 30 pictures per second, and it depends on the connection. So it is not good for games or constant animation. It is very good for charts, dashboards and simple widgets: they open in less than one second on any device and use no data when nothing changes. For animation and games, publish a WASM app.

Something looks different from my MAUI app. DrawnUI draws everything itself on every platform. So a difference is a bug. Please report it in the DrawnUI discussions (Fiddle category).

How do I get Premium? At the moment we give it by request. Write to [email protected].

Contact: [email protected].