2
0
mirror of https://github.com/frappe/books.git synced 2024-12-27 12:42:44 +00:00
books/docs/client/ui/index.md
2018-01-12 17:55:07 +05:30

35 lines
534 B
Markdown

# UI
Frappe.js UI library helps create elements from the Native DOM
### frappe.ui.add
Add a new HTMLElement
```js
let div = frappe.ui.add('div', 'box', parentElement);
```
### frappe.ui.remove
Remove a new HTMLElement from its parent
```js
frappe.ui.remove(element);
```
### frappe.ui.add_class
Add a class to an existing document
```js
frappe.ui.add_class(element, 'box');
```
### frappe.ui.make_dropdown
Create and return a new dropdown element
```js
let dropdown = frappe.ui.make_dropdown('Actions', this.toolbar);
```