Preview updates automatically as you type
100%
Loading editor...
Preview updates automatically as you type
Add padding around the diagram
Set width or height for PNG/SVG exports; aspect ratio will be maintained
Sketchitor Language
rectangle
circle
ellipse
text
line
linearpath
polygon
arc
curve
path
page
parallelogram
document
cylinder
queue
package
step
callout
stored_data
person
diamond
hexagon
cloud
line
line from=a.right to=b.left stroke="#666"line from=a.right to=b.left shapeEnd=arrowline x1=50 y1=50 x2=200 y2=50 shapeEnd=circleline from=a.top to=b.bottom shapeStart=circle shapeEnd=arrow label="Flow"arrow
line with shapeEnd=arrow instead
Use for lines and positioning:
center
top
bottom
left
right
topleft
topright
bottomleft
bottomright
x=box.right.x y=box.top.y - Extract x or yx=box.center.x+20 - Arithmetic expressionsy=box.bottom.y-15 - Subtract from anchortopleft not top-leftfill="#e3f2fd" - Fill color (hex)stroke="#2196f3" - Stroke color (hex)fill="theme:fill.primary" - Theme color (light/dark aware)stroke="theme:accent.blue" - Theme accent@theme directive and theme: prefix for automatic light/dark mode support. See Themes section below.hachure
solid
zigzag
cross-hatch
dots
dashed
zigzag-line
hachureAngle - Angle in degreeshachureGap - Gap between lines (px)fillWeight - Line widthroughness=0.5 - Smoothroughness=1 - Defaultroughness=3 - Very rough@seed 42 directive for consistent sketchy patterns across rendersstrokeWidth - Line thickness (pixels)strokeStyle - solid | dashed | dottedstrokeDash="5,5" - Custom dash pattern (overrides strokeStyle)strokeDash="5,5" - 5px dash, 5px gapstrokeDash="10,5" - 10px dash, 5px gapstrokeDash="10,5,2,5" - Dash-dot patternstrokeDash="15,3,3,3" - Complex patternfont - hand-drawn | normal | monospacefontSize - Font size in pixelslabel - Text label for shapeslabelFont - Font for labelslabelFontSize - Font size for labelswrapWidth - Max width for text wrapping (text primitive)origin - center | topleft | topright | bottomleft | bottomright | top | bottom | left | rightcorner - Radius for rounded rectangle corners (default: 0)The origin attribute determines which point of the shape the x/y coordinates refer to:
origin=topleft - x/y is top-left cornerorigin=center - x/y is center (default)origin=bottomright - x/y is bottom-right cornertopleft not top-leftUse the corner attribute on rectangles for rounded corners:
corner=0 - Sharp corners (default)corner=10 - Slightly roundedcorner=20 - More roundedDraw shapes three times with slight offsets to show multiple instances:
multi=false - Single instance (default)multi=true - Three instances with stack effectcylinder x=0 y=0 width=80 height=120 multi=true label="DB Replicas"rectangle x=100 y=0 width=100 height=80 multi=true label="Servers"cloud x=200 y=0 width=120 height=80 multi=true label="Services"@grid on - Enable coordinate grid@grid off - Disable grid (default)@seed 42 - Set random seed for deterministic rendering@seed to override with a specific value.@shadow on - Enable drop shadows for all elements@shadow off - Disable drop shadows (default)@theme neutral-default - Set color theme with light/dark mode supportneutral-default
dark-mauve
cool-classic
mixed-berry
grape-soda
forest
oceanic
sunset
monochrome
theme:fill.primary theme:fill.secondary theme:fill.tertiarytheme:stroke theme:stroke.boldtheme:accent.blue theme:accent.green theme:accent.red theme:accent.yellow theme:accent.purpletheme:text.primary theme:text.secondary theme:text.tertiarytheme:bg@theme forestrectangle fill="theme:fill.primary" stroke="theme:stroke"circle fill="theme:accent.green" stroke="theme:stroke.bold"$variable = value - Define variable$x = 100 - Numeric value$color = "#ff0000" - String value$spacing = $x + 20 - Arithmetic expressions$size = 100$fill = "#e3f2fd"rectangle x=0 y=0 width=$size height=$size fill=$fill${"{expression}"} - Embed expressions in text and parametersvalue="Step ${"{i}"}" - In text labelsx=${"{i*spacing}"} - In coordinates with arithmeticvalue="Total: ${"{width*height}"}" - Complex expressions$count = 5$spacing = 120text x=0 y=0 value="Item ${"{count}"}" fontSize=14rectangle x=${"{count*spacing}"} y=${"{spacing/2}"} width=100 height=60+ - * /for $var in start..stop: - Loop syntaxend - Close loopfor $i in 1..5:circle x=$i*50 y=0 radius=20endfor, in, end, while, if, elif, else, endif, or break as shape IDsif condition: - Start conditionalelif condition: - Else-if branch (optional)else: - Else branch (optional)endif - Close conditional== != < > <= >=&& (and) || (or) ! (not)+ - * / % (modulo)$count = 7if $count > 10:text x=0 y=0 label="Many"elif $count > 5:text x=0 y=0 label="Some"else:text x=0 y=0 label="Few"endifwhile condition: - Loop while condition is trueend - Close loop$i = 0while $i < 5:circle x=${"{i*50}"} y=0 radius=10$i = ${"{i + 1}"}end@maxIterations)break - Exit current loop immediatelyfor $i in 1..10:if $i > 5:breakendifcircle x=${"{i*50}"} y=0 radius=10endmarkdown
**bold** - Bold text*italic* - Italic text`code` - Inline code# Heading - Headings (H1-H6)- item - Bullet lists1. item - Numbered listsmarkdown x=0 y=0 width=300 content="""# Title**Bold** and *italic*- List item"""# Enable grid for positioning
@grid on
@shadow on # Enable drop shadows
# @seed 123 # Optional: override editor's auto-generated seed
# Define variables
$size = 100
$spacing = 150
$count = 3
# Create boxes with for loop
for $i in 1..$count:
rectangle id=box$i x=${i*$spacing} y=0 width=$size height=80 fill="#e3f2fd" stroke="#2196f3"
text x=box$i.center.x y=box$i.center.y label="Box ${i}" fontSize=14
end
# Conditional rendering based on count
if $count > 2:
text x=${($count+1)*$spacing/2} y=-50 label="Multiple items" fontSize=12 fill="#4caf50"
else:
text x=${($count+1)*$spacing/2} y=-50 label="Few items" fontSize=12 fill="#ff9800"
endif
# While loop example
$i = 1
while $i <= $count:
circle x=box$i.center.x y=120 radius=8 fill="#f44336"
$i = ${i + 1}
end
# Connect boxes with arrows
for $k in 1..${$count-1}:
line from=box$k.right to=box${$k+1}.left shapeEnd=arrow label="Flow" labelPosition=center
end
Ctrl+Enter
Ctrl+Space
Ctrl+/
Alt+↑/↓