How to draw lines
- Choose your line type
Click the Line tool button. A compact submenu appears next to the button with three options:
- Straight — For direct point-to-point lines
- Curved — For quadratic Bézier curves with a control point
- Multi-line Shape — For closed shapes made from multiple straight segments
Your selection is highlighted and announced to screen readers. You can switch types at any time by clicking the submenu buttons again.
- Configure line properties
The context panel displays customisation options:
- Style: Choose from Solid, Dashed, Dotted, or Dash-Dot patterns
- Arrows: Add arrowheads at None, Start, End, or Both positions (straight/curved modes)
- Stroke: Set width from 0–100 pixels (default 3 px). The slider and number input stay synchronised
All controls update the live preview immediately so you can see your changes before placement.
- Draw your line
For straight lines:
- Click once to set the start point
- Move your pointer to position the end point
- Click again to place the line
- Hold Shift to constrain to horizontal or vertical directions (snaps to nearest 90° angle)
For curved lines:
- Click once to set the start point
- Click again to set the curve control point (this shapes the curve)
- Click a third time to set the end point
- Blue helper guides show the control point and tangent lines whilst you work
For multi-line shapes:
- Click once to set the first corner
- Click additional points to add each straight segment
- Click near the first point to close the shape, or press Enter when at least 3 points exist
- After closing, use the Fill or Gradient Fill tools to fill only inside the shape boundary
- Live preview
A dotted preview follows your pointer whilst you position each point. The preview shows your selected style, arrows, stroke width, and current colour. In Multi-line Shape mode, a start-point marker and close guide appear, turning green when you're close enough to close the shape. Completed output uses vector-effect: non-scaling-stroke so stroke width appears consistent at any zoom level.
- Cancel or undo
Press Esc at any point before completing the line to cancel the operation and clear the preview. After placement, use the History tool or standard undo shortcuts to remove or restore lines.
Line types explained
Straight Lines
Create perfect straight lines between two points. Hold Shift to constrain to horizontal or vertical directions, ideal for technical diagrams, borders, and geometric designs.
Curved Lines
Draw elegant quadratic Bézier curves using three points: start, control point (shapes the curve), and end. Perfect for flowing connectors, decorative elements, and organic shapes.
Multi-line Shapes
Create closed shapes from several straight edges by clicking corner points one-by-one. When closed, the shape can be filled with solid colour or gradients without leaking into the background.
Switching types: If you switch line types whilst a line is in progress, the current operation is automatically cancelled and the preview cleared. This prevents accidental misplacement.
Controls reference
Line Type Submenu
Appears next to the Line tool button when active. Click Straight, Curved, or Multi-line Shape to switch modes. The active mode is visually highlighted with a blue background.
Style Buttons
Solid — No dashes (default)
Dashed — 10px dash, 5px gap pattern
Dotted — Small dots with spacing
Dash-Dot — Alternating dashes and dots
Arrow Markers
None — Plain line (default)
Start — Arrowhead at beginning
End — Arrowhead at end
Both — Arrowheads at both ends
Stroke Width
Range: 0–100 pixels (default 3 px). Use the slider for quick adjustments or type a specific value in the number box. Both controls stay synchronised.
Colour
Lines use your currently selected drawing colour from the application colour picker. The preview automatically reflects the selected colour.
Cancellation
Press Esc at any time whilst placing a line or shape to cancel the operation and remove the preview. Works for straight, curved, and multi-line modes.
Style pattern details
stroke-dasharray: none. Best for general purpose drawing and primary elements.
Adaptive patterns: Dotted and Dash-Dot patterns automatically adjust their spacing based on your stroke width, ensuring they look proportional at any thickness.
Keyboard shortcuts
Technical features
<marker> elements stored in the document's <defs> section for efficient rendering.
data-tool and data-timestamp attributes for version control and history management.
Accessibility features
WCAG 2.2 Level AA compliant: The Line tool provides comprehensive accessibility for users who rely on assistive technology, keyboard navigation, or alternative input methods.
role="group", buttons have aria-pressed states, and inputs have descriptive aria-label attributes.
prefers-reduced-motion settings by disabling animations for users who find motion distracting or uncomfortable.
Related tools
Pencil Tool
For freehand drawing with automatic smoothing. Features stroke width control (0–50 px), automatic quadratic curve smoothing, and the ability to create organic, flowing lines. Perfect for sketches, signatures, and annotations that complement precise line work.
Print Preview Tool
Select specific areas of your drawing for printing. Click and drag to define a rectangular print area with automatic validation for minimum size requirements. Useful for preparing precise sections of your work for output.
Tips for better results
When drawing straight lines, hold Shift before moving your pointer after the first click. This ensures the constraint is active throughout your movement. Release Shift if you need to adjust position freely.
The control point determines the curve's shape. Place it closer to the start or end for sharp curves, or further away for gentle, flowing curves. Experiment with different positions to achieve the desired effect.
In Multi-line Shape mode, place at least three points, then close by clicking near your first point (or pressing Enter). Once closed, use Fill or Gradient Fill to colour the inside cleanly.
Different line styles convey different meanings. Use solid lines for primary elements, dashed for secondary or hidden elements, and dotted for construction guides or temporary markers. This creates visual hierarchy in technical drawings.
Arrow placement matters for flow diagrams. "Start" arrows point from the line start, "End" arrows point to the line end. Choose based on the direction of flow or relationship you're illustrating. Arrow markers are used in straight and curved modes.
Remember that stroke width doesn't scale with zoom level. If lines appear too thick when zoomed in, reduce the pixel value rather than adjusting zoom. This ensures consistent appearance across different viewing contexts.