I came across this page where they explain how to draw fancy arrows with shadows etc.

Fancy arrows with TikZ

However, in the example, the arrows are embedded in the text. I would like to draw it in the tikzfigure environment between nodes.

 \node[right of=a,node distance=10cm](b){};

 \draw[ ??](a) -- (b);


What is the correct syntax in the example?

  • arrows in the answers in your link are nodes and they can not be simple draw as lines.
    – Zarko
    Commented Apr 26, 2018 at 10:53
  • I'm not sure if I understand your comment. I would like to know how to draw an arrow between two nodes with the given style in the link. Commented Apr 26, 2018 at 10:56
  • arrows (for example from arrows.meta) as lines yes, as nodes no (only if node fit this two coordinates, however, in this you limited quite limited
    – Zarko
    Commented Apr 26, 2018 at 11:03
  • Could you post a MWE so we can see what you want to achieve precisely ?
    – BambOo
    Commented Apr 26, 2018 at 11:04
  • I cannot, because I don't have a working example. Commented Apr 26, 2018 at 12:24

1 Answer 1


If you use the code from the accepted answer to Fancy arrows with TikZ, then note that the arrowstyle style takes an argument that determines the length of the arrow. Hence, if you have

\node [draw] (a) {A};
\node [draw,right=5cm of a] (b) {B};

so you know the distance between the nodes is 5cm, then you can use

\node [arrowstyle=5cm,right=0pt of a] {};

to get such an arrow starting at a, ending at b.

Addendum: The right of= syntax you used is considered deprecated, instead you should load the positioning library and use right=of, as I did above. See Difference between "right of=" and "right=of" in PGF/TikZ

If you don't know the exact distance, or you need to rotate it (i.e. if node b isn't straight right of a), then you can load the calc library and calculate distance and angle like this:

   \p1=(a2.south east), % start point
   \p2=(b2.north west), % end point
   \n1={veclen(\x2-\x1,\y2-\y1)}, % distance between start and end
   \n2={atan2(\y2-\y1,\x2-\x1)}   % angle between start and end
  node [arrowstyle=\n1,
        right=0 of a2.south east,
        fading angle=\n2 % only  affects shadow
       ] {};

Note that the colour fading itself is not rotated, so that always goes from top to bottom. Note also that because this is a node, not a normal line path, you can only have straight lines, curved or kinked arrows are not possible.

enter image description here


\tikzfading[name=arrowfading, top color=transparent!0, bottom color=transparent!95]

     top color=OrangeRed!20,
     bottom color=Red,
     general shadow={fill=black, shadow yshift=-0.8ex, path fading=arrowfading}
     single arrow,
     minimum height=#1,
     single arrow head extend=.4cm

 \node [draw] (a) {A};
 \node [draw,right=5cm of a] (b) {B};
 \node [arrowstyle=5cm,right=0pt of a]{};

 \node [draw,below=1cm of a] (a2) {A2};
 \node [draw,below right=3cm of a2] (b2) {B2};
 \node [arrowstyle=3cm,
        right=0 of a2.south east,
        fading angle=-45 % only  affects shadow
       ] {};

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .