Code
npm i @purrfect-ui/components
Import
To use the Code component in your project, import it as follows:
import { Code } from "@purrfect-ui/components";
Usage
The Code component is designed to make embedding and showcasing code snippets seamless. Here's an example of its basic usage:
Basic Usage
export function CodeDemo() {
return (
<Code
code="npm i @purrfect-ui/components"
/>
);
}
export default CodeDemo;
Key Features
-
Syntax Highlighting: Automatic language detection for better readability.
-
Customizable Themes: Supports multiple themes for code block styling.
-
Responsive Design: Scales beautifully across devices.
-
Integrates Easily: Works out of the box with minimal setup required.
-
Lightweight: Designed to be fast and performant.