Arrows in TikZ
Master arrow tips, styles, and customization in TikZ for professional diagrams.
Basic Arrow Syntax
Add arrows to lines using the arrow tip specifiers in square brackets:
\begin{tikzpicture}
% Arrow at the end
\draw[->] (0,0) -- (2,0);
% Arrow at the start
\draw[<-] (0,-0.5) -- (2,-0.5);
% Arrows at both ends
\draw[<->] (0,-1) -- (2,-1);
% Reversed arrow direction
\draw[>-<] (0,-1.5) -- (2,-1.5);
\end{tikzpicture}arrows.meta library: \usetikzlibrary{arrows.meta}Arrow Tips (Basic)
Common arrow tip styles without libraries:
| Syntax | Description |
|---|---|
-> | Standard arrow tip |
->> | Double arrow tip |
-| | Bar (perpendicular line) |
-o | Circle tip |
-* | Filled circle tip |
-stealth | Stealth fighter style |
-latex | LaTeX style arrow |
\begin{tikzpicture}
\draw[->] (0,0) -- (2,0) node[right] {->};
\draw[->>] (0,-0.5) -- (2,-0.5) node[right] {->>};
\draw[-|] (0,-1) -- (2,-1) node[right] {-|};
\draw[-stealth] (0,-1.5) -- (2,-1.5) node[right] {-stealth};
\draw[-latex] (0,-2) -- (2,-2) node[right] {-latex};
\end{tikzpicture}Modern Arrows with arrows.meta
The arrows.meta library provides highly customizable arrow tips:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Stealth arrow (recommended for most diagrams)
\draw[-Stealth] (0,0) -- (2,0);
% LaTeX style
\draw[-Latex] (0,-0.5) -- (2,-0.5);
% Triangle arrow
\draw[-Triangle] (0,-1) -- (2,-1);
% Circle
\draw[-Circle] (0,-1.5) -- (2,-1.5);
% Square
\draw[-Square] (0,-2) -- (2,-2);
% Diamond
\draw[-Diamond] (0,-2.5) -- (2,-2.5);
\end{tikzpicture}Customizing Arrow Size
Control arrow tip dimensions with parameters:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Default size
\draw[-Stealth] (0,0) -- (3,0) node[right] {default};
% Custom length
\draw[-{Stealth[length=5mm]}] (0,-0.7) -- (3,-0.7) node[right] {length=5mm};
% Custom width
\draw[-{Stealth[width=4mm]}] (0,-1.4) -- (3,-1.4) node[right] {width=4mm};
% Both length and width
\draw[-{Stealth[length=6mm, width=3mm]}] (0,-2.1) -- (3,-2.1) node[right] {6mm x 3mm};
% Scale factor
\draw[-{Stealth[scale=2]}] (0,-2.8) -- (3,-2.8) node[right] {scale=2};
\end{tikzpicture}Arrow Tip Styles
Modify the appearance of arrow tips:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Open (unfilled) arrow
\draw[-{Stealth[open]}] (0,0) -- (3,0) node[right] {open};
% Filled (default)
\draw[-{Stealth[fill=red]}] (0,-0.7) -- (3,-0.7) node[right] {fill=red};
% Different fill and line color
\draw[blue, -{Stealth[fill=yellow]}] (0,-1.4) -- (3,-1.4) node[right] {blue line, yellow fill};
% Reversed direction
\draw[-{Stealth[reversed]}] (0,-2.1) -- (3,-2.1) node[right] {reversed};
% Round arrow
\draw[-{Stealth[round]}] (0,-2.8) -- (3,-2.8) node[right] {round};
\end{tikzpicture}Multiple Arrow Tips
Combine multiple arrow tips on a single line:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Double stealth arrows
\draw[-{Stealth[]}_{Stealth[]}] (0,0) -- (3,0);
% Triple arrows
\draw[-{>[]}>{>[]}>{>[]}] (0,-0.7) -- (3,-0.7);
% Different tips at start and end
\draw[{Circle}-{Stealth}] (0,-1.4) -- (3,-1.4);
% Bar and arrow
\draw[{|}-{Stealth}] (0,-2.1) -- (3,-2.1);
\end{tikzpicture}Arrow Positioning
Control where the arrow tip ends:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
\node[draw, circle] (A) at (0,0) {A};
\node[draw, circle] (B) at (3,0) {B};
% Default: arrow touches node border
\draw[-Stealth] (A) -- (B);
% Shorten to leave gap
\draw[-Stealth, shorten >=3pt, shorten <=3pt] (0,-1.5) -- (3,-1.5);
\end{tikzpicture}Curved Arrows
Add arrows to curved paths:
\begin{tikzpicture}
% Bezier curve with arrow
\draw[->, thick] (0,0) .. controls (1,1) and (2,1) .. (3,0);
% Arc with arrow
\draw[->, thick] (5,0) arc (180:0:1cm);
% Bending arrow
\draw[->, thick] (0,-2) to[bend left] (2,-2);
\draw[->, thick] (0,-3) to[bend right] (2,-3);
% Loop arrow
\draw[->, thick] (4,-2.5) to[loop above] (4,-2.5);
\end{tikzpicture}Global Arrow Settings
Set default arrow styles for your entire document:
\usetikzlibrary{arrows.meta}
% In preamble: set default arrow tip
\tikzset{
>=Stealth, % Default arrow tip
every picture/.style={
line width=0.75pt
}
}
% Now all arrows use Stealth by default
\begin{tikzpicture}
\draw[->] (0,0) -- (2,0); % Uses Stealth
\draw[->] (0,-0.5) -- (2,-0.5); % Uses Stealth
\end{tikzpicture}Arrows in Flowcharts
Common arrow patterns for diagrams:
\usetikzlibrary{arrows.meta, positioning}
\begin{tikzpicture}[
box/.style={draw, rectangle, minimum width=2cm, minimum height=0.8cm},
arrow/.style={-Stealth, thick}
]
\node[box] (a) {Start};
\node[box, right=2cm of a] (b) {Process};
\node[box, right=2cm of b] (c) {End};
\draw[arrow] (a) -- (b);
\draw[arrow] (b) -- (c);
% Feedback loop
\draw[arrow] (b) to[bend right=40] node[below] {Retry} (a);
\end{tikzpicture}Next Steps
Continue exploring TikZ features:
- Colors and Styles - Color your arrows and lines
- Flowcharts - Complete flowchart tutorial
- Nodes and Labels - Add labels to arrows
Arrows in TikZ
Master arrow tips, styles, and customization in TikZ for professional diagrams.
Basic Arrow Syntax
Add arrows to lines using the arrow tip specifiers in square brackets:
\begin{tikzpicture}
% Arrow at the end
\draw[->] (0,0) -- (2,0);
% Arrow at the start
\draw[<-] (0,-0.5) -- (2,-0.5);
% Arrows at both ends
\draw[<->] (0,-1) -- (2,-1);
% Reversed arrow direction
\draw[>-<] (0,-1.5) -- (2,-1.5);
\end{tikzpicture}arrows.meta library: \usetikzlibrary{arrows.meta}Arrow Tips (Basic)
Common arrow tip styles without libraries:
| Syntax | Description |
|---|---|
-> | Standard arrow tip |
->> | Double arrow tip |
-| | Bar (perpendicular line) |
-o | Circle tip |
-* | Filled circle tip |
-stealth | Stealth fighter style |
-latex | LaTeX style arrow |
\begin{tikzpicture}
\draw[->] (0,0) -- (2,0) node[right] {->};
\draw[->>] (0,-0.5) -- (2,-0.5) node[right] {->>};
\draw[-|] (0,-1) -- (2,-1) node[right] {-|};
\draw[-stealth] (0,-1.5) -- (2,-1.5) node[right] {-stealth};
\draw[-latex] (0,-2) -- (2,-2) node[right] {-latex};
\end{tikzpicture}Modern Arrows with arrows.meta
The arrows.meta library provides highly customizable arrow tips:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Stealth arrow (recommended for most diagrams)
\draw[-Stealth] (0,0) -- (2,0);
% LaTeX style
\draw[-Latex] (0,-0.5) -- (2,-0.5);
% Triangle arrow
\draw[-Triangle] (0,-1) -- (2,-1);
% Circle
\draw[-Circle] (0,-1.5) -- (2,-1.5);
% Square
\draw[-Square] (0,-2) -- (2,-2);
% Diamond
\draw[-Diamond] (0,-2.5) -- (2,-2.5);
\end{tikzpicture}Customizing Arrow Size
Control arrow tip dimensions with parameters:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Default size
\draw[-Stealth] (0,0) -- (3,0) node[right] {default};
% Custom length
\draw[-{Stealth[length=5mm]}] (0,-0.7) -- (3,-0.7) node[right] {length=5mm};
% Custom width
\draw[-{Stealth[width=4mm]}] (0,-1.4) -- (3,-1.4) node[right] {width=4mm};
% Both length and width
\draw[-{Stealth[length=6mm, width=3mm]}] (0,-2.1) -- (3,-2.1) node[right] {6mm x 3mm};
% Scale factor
\draw[-{Stealth[scale=2]}] (0,-2.8) -- (3,-2.8) node[right] {scale=2};
\end{tikzpicture}Arrow Tip Styles
Modify the appearance of arrow tips:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Open (unfilled) arrow
\draw[-{Stealth[open]}] (0,0) -- (3,0) node[right] {open};
% Filled (default)
\draw[-{Stealth[fill=red]}] (0,-0.7) -- (3,-0.7) node[right] {fill=red};
% Different fill and line color
\draw[blue, -{Stealth[fill=yellow]}] (0,-1.4) -- (3,-1.4) node[right] {blue line, yellow fill};
% Reversed direction
\draw[-{Stealth[reversed]}] (0,-2.1) -- (3,-2.1) node[right] {reversed};
% Round arrow
\draw[-{Stealth[round]}] (0,-2.8) -- (3,-2.8) node[right] {round};
\end{tikzpicture}Multiple Arrow Tips
Combine multiple arrow tips on a single line:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
% Double stealth arrows
\draw[-{Stealth[]}_{Stealth[]}] (0,0) -- (3,0);
% Triple arrows
\draw[-{>[]}>{>[]}>{>[]}] (0,-0.7) -- (3,-0.7);
% Different tips at start and end
\draw[{Circle}-{Stealth}] (0,-1.4) -- (3,-1.4);
% Bar and arrow
\draw[{|}-{Stealth}] (0,-2.1) -- (3,-2.1);
\end{tikzpicture}Arrow Positioning
Control where the arrow tip ends:
\usetikzlibrary{arrows.meta}
\begin{tikzpicture}
\node[draw, circle] (A) at (0,0) {A};
\node[draw, circle] (B) at (3,0) {B};
% Default: arrow touches node border
\draw[-Stealth] (A) -- (B);
% Shorten to leave gap
\draw[-Stealth, shorten >=3pt, shorten <=3pt] (0,-1.5) -- (3,-1.5);
\end{tikzpicture}Curved Arrows
Add arrows to curved paths:
\begin{tikzpicture}
% Bezier curve with arrow
\draw[->, thick] (0,0) .. controls (1,1) and (2,1) .. (3,0);
% Arc with arrow
\draw[->, thick] (5,0) arc (180:0:1cm);
% Bending arrow
\draw[->, thick] (0,-2) to[bend left] (2,-2);
\draw[->, thick] (0,-3) to[bend right] (2,-3);
% Loop arrow
\draw[->, thick] (4,-2.5) to[loop above] (4,-2.5);
\end{tikzpicture}Global Arrow Settings
Set default arrow styles for your entire document:
\usetikzlibrary{arrows.meta}
% In preamble: set default arrow tip
\tikzset{
>=Stealth, % Default arrow tip
every picture/.style={
line width=0.75pt
}
}
% Now all arrows use Stealth by default
\begin{tikzpicture}
\draw[->] (0,0) -- (2,0); % Uses Stealth
\draw[->] (0,-0.5) -- (2,-0.5); % Uses Stealth
\end{tikzpicture}Arrows in Flowcharts
Common arrow patterns for diagrams:
\usetikzlibrary{arrows.meta, positioning}
\begin{tikzpicture}[
box/.style={draw, rectangle, minimum width=2cm, minimum height=0.8cm},
arrow/.style={-Stealth, thick}
]
\node[box] (a) {Start};
\node[box, right=2cm of a] (b) {Process};
\node[box, right=2cm of b] (c) {End};
\draw[arrow] (a) -- (b);
\draw[arrow] (b) -- (c);
% Feedback loop
\draw[arrow] (b) to[bend right=40] node[below] {Retry} (a);
\end{tikzpicture}Next Steps
Continue exploring TikZ features:
- Colors and Styles - Color your arrows and lines
- Flowcharts - Complete flowchart tutorial
- Nodes and Labels - Add labels to arrows