![keyboard](https://private-user-images.githubusercontent.com/46908343/291767033-d7a6f2a9-018f-4930-93a5-18ed0b4b87eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDY4MTksIm5iZiI6MTczOTMwNjUxOSwicGF0aCI6Ii80NjkwODM0My8yOTE3NjcwMzMtZDdhNmYyYTktMDE4Zi00OTMwLTkzYTUtMThlZDBiNGI4N2ViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDIwNDE1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4ZTg1ZTM4M2Y3MTQ3NTk4NzIwMTRiZTJjOGQwZWE5NDZiOWFmNmE4ZDMwNDA3YjZiZTBiYjNmMzg4ZDZhNzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.b0VkJxC7YrSgH-Ypr0nBypyxkoVsDILhPRgBNQ3zOrM)
Arabic Virtual Keyboard is a tool that helps english speakers write in Arabic without having a dedicated arabic keyboard.
The keyboard is fully featured and contains support for all letters, numbers, special characters, diacritical marks, and text to speech.
This keyboard was built as a web component and is fully compatiable with your JS, React, Angular or Vue projects.
You can use arabic-virtual-keyboard as a <script> tag from a CDN, or install it from npm.
npm i arabic-virtual-keyboard
<script type="module" src="https://cdn.jsdelivr.net/npm/arabic-virtual-keyboard/+esm"></script>
<div>
<arabic-keyboard></arabic-keyboard>
</div>
This requires use of the @lit/react package
npm install @lit/react
import React from 'react';
import { ArabicKeyboard as ArabicKeyboardWC } from 'arabic-virtual-keyboard'
import {createComponent} from '@lit/react';
const ArabicKeyboard = createComponent({
tagName: 'arabic-keyboard',
elementClass: ArabicKeyboardWC,
react: React,
});
function App() {
return (
<div>
<ArabicKeyboard showEnglishValue="true" showShiftedValue="true"></ArabicKeyboard>
</div>
)
}
export default App
showEnglishValue
-> show transliterated english key
showShiftedValue
-> show shifted value of key
Attribute | Default |
---|---|
showEnglishValue | false |
showShiftedValue | false |
<div>
<arabic-keyboard showEnglishValue="true" showShiftedValue="true">
</arabic-keyboard>
</div>
Restyle the keyboard by utilizing css custom properties
Property | Default |
---|---|
--keyboard-row-gap | 4px |
--font-size | 18px |
--max-keyboard-width | 800px |
--row-height | 50px |
--border-radius | 4px |
--button-background-color | #ececec |
--border | 1px solid #999999 |
--button-active-background-color | #d6d6d6 |
--button-active-border | 1px solid #8f8f8f |
--button-padding | 4px |
--button-color | #000000 |
--button-shifted-color | #ff0000 |
--button-eng-color | #0000ff |
--button-hover-background-color | #e0e0e0 |
--textarea-background-color | #ffffff |
--font-family | "Arial", sans-serif |