Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fauna-labs/ink-syntax-highlight

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fauna-labs/ink-syntax-highlight

Syntax highlight component for Ink

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
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

FAQs

Package last updated on 08 Nov 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc