This probably would also be doable with a tree (child) but the first thing that got to my mind was a rectangle split node.
The left node mimics what I tried to achieve and is even not good because the inner node is used to calculate the bounding box (this is the reason I had to set border=8pt for the standalone class).
So to have a node-node with <Outer Name> and <Inner Name> you just have to write the usual:
<path> node[subcomponent=<Inner Name>] {Outer Name} <path>;
or
\node[subcomponent=<Inner Name>] {Outer Name};
The inner node has an extra fill=none added which consequence can be seen if the opacity key is used.
If such little icon in the upper right corner should appear too, you should provide either code or an example for it as it will probably require a little effort on the \tikzlastnode side.
Code
\usetikzlibrary{shapes.multipart}
\tikzset{
mycomponent/.style={
draw,
fill=yellow!40,
rectangle split,
rectangle split parts=2,
rectangle split allocate boxes=2,
rectangle split empty part height=4ex,
rectangle split empty part width=0ex,
},
subcomponent/.style={
mycomponent,
measure me={#1},
rectangle split every empty part={},% resets empty-part macro
% see http://tex.stackexchange.com/a/88700
rectangle split empty part height={max(4ex,\qrrInnerNodeHeight)},
rectangle split empty part width=\qrrInnerNodeWidth,
append after command={
node[mycomponent,fill=none,anchor=south west] at (\tikzlastnode.two) {#1}
}
},
measure me/.code={%
\global\sbox0{\tikz[baseline=0pt]\node[mycomponent,anchor=south]{#1};}%
\edef\qrrInnerNodeWidth{\the\wd0}%
\edef\qrrInnerNodeHeight{\the\ht0}%
},
}
\begin{document}
\begin{tikzpicture}
\node [mycomponent] {%
Component
\nodepart{two}
\tikz{\node[mycomponent] {Subcomponent};}
};
\node [xshift=3cm,subcomponent=Subcomponent] (t) {Component};
\end{tikzpicture}
\end{document}
Output

\draw mynodeis very difficult to make work. Would\draw node[mynode]be okay? – Andrew Stacey Dec 22 '12 at 17:35\draw node[mynode]syntax, because it will be of course enough. – Meter Dec 23 '12 at 10:43