Socket
Socket
Sign inDemoInstall

@dev_imlab/react-hangul-keyboard

Package Overview
Dependencies
9
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dev_imlab/react-hangul-keyboard

React Virtual Keyboard Korean, English Supported.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

React Hangul Keyboard

react-simple-keyboard 라이브러리가 한글을 정상적으로 지원하지 않기 때문에 hangul.js 라이브러리의 assemble를 활용하여 한글의 받침 이슈를 처리하는 hangul-virtual-keyboard 라이브러리를 기반으로 레이아웃 커스텀 기능과 타입을 추가했습니다.

Install

npm install @dev_imlab/react-hangul-keyboard

Usage

import { useState } from 'react';
import Keyboard from 'react-hangul-keyboard';

const App = () => {
  const [text, setText] = useState('아이엠랩');

  return (
    <>
      <p>{text}</p>
      <KeyBoard getText={setText} defaultText={text} />
    </>
  );
};

export default App;

CSS Styling

global.css에 반드시 다음 내용을 포함해야 합니다.

.hg-theme-default {
  width: 100%;
  user-select: none;
  box-sizing: border-box;
  overflow: hidden;
  touch-action: manipulation;
}

.hg-theme-default .hg-button span {
  pointer-events: none;
}

/* When using option "useButtonTag" */
.hg-theme-default button.hg-button {
  border-width: 0;
  outline: 0;
  font-size: inherit;
}

.hg-theme-default {
  font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue',
    Helvetica, Arial, 'Lucida Grande', sans-serif;
  background-color: #ececec;
  padding: 5px;
  border-radius: 5px;
}

.hg-theme-default .hg-button {
  display: inline-block;
  flex-grow: 1;
  cursor: pointer;
}

.hg-theme-default .hg-row {
  display: flex;
}

.hg-theme-default .hg-row:not(:last-child) {
  margin-bottom: 5px;
}

.hg-theme-default .hg-row .hg-button:not(:last-child) {
  margin-right: 5px;
}

.hg-theme-default .hg-row .hg-button-container {
  margin-right: 5px;
}

.hg-theme-default .hg-row > div:last-child {
  margin-right: 0;
}

.hg-theme-default .hg-row .hg-button-container {
  display: flex;
}

.hg-theme-default .hg-button {
  box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);
  height: 40px;
  border-radius: 5px;
  box-sizing: border-box;
  padding: 5px;
  background: white;
  border-bottom: 1px solid #b5b5b5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.hg-theme-default .hg-button.hg-button-enter {
  min-width: 100px;
}

.hg-theme-default .hg-button.hg-activeButton {
  background: #efefef;
}

.hg-theme-default.hg-layout-numeric .hg-button {
  width: 33.3%;
  height: 60px;
  align-items: center;
  display: flex;
  justify-content: center;
}

.hg-theme-default .hg-button.hg-button-numpadadd {
  height: 85px;
}

.hg-theme-default .hg-button.hg-button-numpadenter {
  height: 85px;
}

.hg-theme-default .hg-button.hg-button-numpad0 {
  width: 105px;
}

.hg-theme-default .hg-button.hg-button-com {
  max-width: 85px;
}

.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {
  max-width: 45px;
}

.hg-theme-default .hg-button.hg-selectedButton {
  background: rgba(5, 25, 70, 0.53);
  color: white;
}

.hg-theme-default .hg-button.hg-standardBtn[data-skbtn='.com'] {
  max-width: 82px;
}

.hg-theme-default .hg-button.hg-standardBtn[data-skbtn='@'] {
  max-width: 60px;
}

Keywords

FAQs

Last updated on 12 May 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