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

534 B

UI

Frappe.js UI library helps create elements from the Native DOM

frappe.ui.add

Add a new HTMLElement

let div = frappe.ui.add('div', 'box', parentElement);

frappe.ui.remove

Remove a new HTMLElement from its parent

frappe.ui.remove(element);

frappe.ui.add_class

Add a class to an existing document

frappe.ui.add_class(element, 'box');

frappe.ui.make_dropdown

Create and return a new dropdown element

let dropdown = frappe.ui.make_dropdown('Actions', this.toolbar);