Socket
Socket
Sign inDemoInstall

react-kotlin-playground

Package Overview
Dependencies
11
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-kotlin-playground

React wrapper for kotlin playground


Version published
Weekly downloads
936
increased by33.14%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

React Kotlin Playground

npm dependencies dependencies downloads

React wrapper for kotlin-playground widget.

Install

npm i --save react-kotlin-playground kotlin-playground

Usage

import React from "react";
import ReactDOM from "react-dom";
import KotlinPlayground from "react-kotlin-playground";
// For modern bundle:
// import KotlinPlayground from 'react-kotlin-playground/es';

ReactDOM.render(
    <KotlinPlayground mode="kotlin">
        fun main(args: Array&lt;String&gt;){" "}
        {
            //sampleStart
            println("Hello World")
            //sampleEnd
        }
    </KotlinPlayground>,
    container
);

API

NameTypeDefaultDescription
classNamestringnullAdd classes for codewrapper
childrennodeInitial source code for run

Plus all options and events from original library:

in react props style - without data- prefix and in camelCase, like

<KotlinPlayground
    autoIndent={2}
    targetPlatform="js"
    {/* ...and any other */ }
>...</KotlinPlayground>

or in html attrs style - like in original library:

<KotlinPlayground
    auto-indent={2}
    data-target-platform="js"
    {/* ...and any other */ }
>...</KotlinPlayground>

More props options

Acknowledgements

Develop By MIT license

Keywords

FAQs

Last updated on 13 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc