🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ink-syntax-highlight

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-syntax-highlight

Synax highlight component for Ink

2.0.2
latest
Source
npm
Version published
Weekly downloads
3K
57.74%
Maintainers
0
Weekly downloads
 
Created
Source

ink-syntax-highlight test

Synax highlight component for Ink.

Example image

Install

$ npm install ink-syntax-highlight

Usage

import React from 'react';
import {render, Text} from 'ink';
import SyntaxHighlight from 'ink-syntax-highlight';

render(<SyntaxHighlight code="const hello = 'world'" />);

Props

code

Type: string

Source code to highlight.

language

Type: string

Language of the source code. If you don't set it yourself, this component will try to auto-detect it. All languages of highlight.js are supported.

theme

Type: Theme

You can write your own theme and pass it as prop. More info regarding custom theme.

Keywords

ink

FAQs

Package last updated on 05 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts