Dev Design Library

Snippet

The Snippet component is used to display a code snippet with syntax highlighting. It can be customized with a symbol before the content and a language for syntax highlighting. The component is also copyable with a CopyButton included by default.

Snippet preview
Library
Lobe UI
Framework
React
Type
component
License
MIT
Install
pnpm add @lobehub/ui
Files
  • src/Snippet/index.ts
  • src/Snippet/Snippet.tsx
  • src/Snippet/stable.ts
  • src/Snippet/style.css
  • src/Snippet/style.ts
  • src/Snippet/type.ts
  • src/Flex/index.ts
  • src/Flex/Center.tsx
Source
https://github.com/lobehub/lobe-ui

Categories

More from Lobe UI