# Code Block Components, Reinvented

> New takes on the code block for React: API code snippet tabs. Each has a live preview, its source and a shadcn install command.

Live page: https://keyframeui.com/patterns/code-block

## New takes on it

- [Polyglot](https://keyframeui.com/components/polyglot.md) (API Code Snippet Tabs): Switch languages and shared values glide into place. Install: `npx shadcn@latest add @keyframeui/polyglot-demo`

## Can stand in for one

- [Diff Apply](https://keyframeui.com/components/diff-apply.md) (Animated Code Diff): Not a code block at heart, but it can stand in for one: a code change applies itself, with Keep and Undo. Install: `npx shadcn@latest add @keyframeui/diff-apply-demo`
- [Agent Session](https://keyframeui.com/components/agent-session.md) (AI Agent Terminal Demo): Not a code block at heart, but it can stand in for one: a coding agent's terminal beside the app it edits. Install: `npx shadcn@latest add @keyframeui/agent-session-demo`
