Let $\cal K$ be a 2-category, and $A$ an object therein. Is there a way to define the "slice object" $A/a$ in $\cal K$ formally (in such a way that if $K = Cat$ we recover precisely the notion of the slice category $A/a$)?


I suggest that if $\cal K$ has comma objects then $A/a = (1\_A\downarrow a)$ where $a\colon 1\to A$ is an "element" of $A$ and $1\_A$ is the identity. 


Is this construction meaningful? If yes, there is a diagram $a\mapsto A/a$ from ${\cal K}(1,A)$ to $\cal K$. What's its colimit (supposing each hom-category is small and $\cal K$ admits this colimit)?



Slice categories in a general 2-category
Yes, that's the right way to define "slice objects" in a 2-category. But there's no way to say what the colimit of that diagram is for a general $K$ and $A$. For instance, $A$ might not admit any "global elements" $1\to A$, so that the colimit would be the initial object. Or, if $K$ is a 1-category regarded as a 2-category, then "$A/a$" is the terminal object for all $a$, so your colimit is the coproduct of one copy of the terminal object for each global element of $A$. You might get something more interesting by looking at generalized elements $X\to A$, or at the universal generalized element $1\_A : A\to A$, but you'll probably still need some "exactness" conditions on $K$ to be able to say anything.


