项目作者: canicjusz

项目描述 :
Tool for creating native-like KaiOS UI.
高级语言: CSS
项目地址: git://github.com/canicjusz/KaiOS-native-UI.git
创建时间: 2020-12-30T10:03:41Z
项目社区:https://github.com/canicjusz/KaiOS-native-UI

开源协议:Do What The F*ck You Want To Public License

下载


``` ### Buttons ```html
``` ### Separator ```html
separator
``` ### Softkeys - Softkeys with text in the middle ```html
left key
select
right key
``` - Softkeys with icon in the middle ```html
left key
right key
``` ### Color, textarea height, scroll, capitalization changing Go to css file and edit values in `:root` ## License WTFPL

KaiOS-native-UI

Tool for creating native-like KaiOS UI.

A gif showing demo

Installation

Include the checkboxes-radios folder, CSS and JS files into your project.

Usage

Basic template

  1. <body>
  2. <div id="app">
  3. <div id="header">header</div>
  4. <div class="toast">This is a toast message</div>
  5. <div id="content">
  6. <!-- add all content of the app in here -->
  7. </div>
  8. <div class="softkeys">
  9. <div class="softkey softkey-left">left key</div>
  10. <div class="softkey softkey-center">select</div>
  11. <div class="softkey softkey-right">right key</div>
  12. </div>
  13. </div>
  14. </body>

List items:

  • List item with text only
  1. <div class="list-item focusable" tabindex="0">
  2. <p class="list-item__text">single line list item</p>
  3. </div>
  4. <div class="list-item focusable" tabindex="0">
  5. <p class="list-item__text">list item</p>
  6. <p class="list-item__subtext">secondary List</p>
  7. </div>
  • List item with indicator
  1. <div class="list-item-indicator focusable" tabindex="0">
  2. <p class="list-item-indicator__text">single line list item</p>
  3. <span class="list-item-indicator__indicator"></span>
  4. </div>
  5. <div class="list-item-indicator focusable" tabindex="0">
  6. <p class="list-item-indicator__text">two-lines list item</p>
  7. <p class="list-item-indicator__subtext">with next indicator</p>
  8. <span class="list-item-indicator__indicator"></span>
  9. </div>
  • List item with icon
  1. <div class="list-item-icon focusable" tabindex="0">
  2. <img src="" alt="" class="list-item-icon__icon" />
  3. <div class="list-item-icon__text-container">
  4. <p class="list-item-icon__text">single line list item</p>
  5. </div>
  6. </div>
  7. <div class="list-item-icon focusable" tabindex="0">
  8. <img src="" alt="" class="list-item-icon__icon" />
  9. <div class="list-item-icon__text-container">
  10. <p class="list-item-icon__text">single line list item</p>
  11. <p class="list-item-icon__subtext">with next indicator</p>
  12. </div>
  13. </div>
  • List item with checkbox
  1. <div class="checkbox-container">
  2. <p class="checkbox-container__text">checkbox list item</p>
  3. <p class="checkbox-container__subtext">secondary List</p>
  4. <input
  5. type="checkbox"
  6. tabindex="0"
  7. class="focusable checkbox-container__input"
  8. />
  9. <div class="checkbox-container__checkbox"></div>
  10. </div>

Note: you can change checkbox apperance in CSS, simply navigate to the checkbox-container__checkbox class in the CSS file and provide path to other image.

  • List item with radio button
  1. <div class="radio-container">
  2. <p class="radio-container__text">radio button list item</p>
  3. <p class="radio-container__subtext">secondary List</p>
  4. <input type="radio" tabindex="0" class="focusable radio-container__input" />
  5. <div class="radio-container__radio"></div>
  6. </div>

Note: you can change radio apperance in CSS, simply navigate to the radio-container__radio class in the CSS file and provide path to other image.

  • List item with slider
  1. <div class="slider-container">
  2. <p class="slider-container__text">alarm</p>
  3. <p class="slider-container__subtext">5/15</p>
  4. <input
  5. type="range"
  6. tabindex="0"
  7. min="1"
  8. max="15"
  9. value="5"
  10. class="slider-container__slider focusable"
  11. />
  12. </div>
  • List item with progress bar
  1. <div class="progress-container" tabindex="0">
  2. <label class="progress-container__label"> downloading </label>
  3. <progress
  4. value="65"
  5. max="100"
  6. class="progress-container__progress focusable"
  7. ></progress>
  8. </div>

Note: make sure to add progress-container__progress--min class to the progress element upon reaching minimal value and progress-container__progress--max upon reaching maximal value. Otherwise the progress bar will not look as expected #6.

Inputs and textareas:

  • Input
  1. <div class="input-container">
  2. <label class="input-container__label">label text</label>
  3. <input type="text" tabindex="0" class="input-container__input focusable" />
  4. </div>
  • Textarea

```html