A snippet with a run button, and the output it produced attached below it.
npx shadcn@latest add @assistant-ui/elements-code-runner
elements-code-runner