` | Function to be called when the item is clicked. |
## Example
```tsx
'use client';
import { UserButton } from '@stackframe/stack';
export default function Page() {
return (
User Button
{ console.log("color mode toggle clicked") }}
extraItems={[{
text: 'Custom Action',
icon: ,
onClick: () => console.log('Custom action clicked')
}]}
/>
);
}
```