luna-toolbar
v0.7.1
Published
Application toolbar
Downloads
80
Readme
Luna Toolbar
Application toolbar.
Demo
https://luna.liriliri.io/?path=/story/toolbar
Install
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-toolbar/luna-toolbar.css" />
<script src="//cdn.jsdelivr.net/npm/luna-toolbar/luna-toolbar.js"></script>
You can also get it on npm.
npm install luna-toolbar --save
import 'luna-toolbar/luna-toolbar.css'
import LunaToolbar from 'luna-toolbar'
Usage
const toolbar = new LunaToolbar(container)
toolbar.appendText('Test')
Api
appendHtml(html: string | HTMLElement): LunaToolbarHtml
Append html.
appendInput(key: string, value: string, placeholder?: string): ToolbarInput
Append text input.
appendSelect(key: string, value: string, options: PlainObj): LunaToolbarSelect
Append select.
appendSeparator(): ToolbarSeparator
Append separator.
appendSpace(): ToolbarSpace
Append item that fills the remaining space.
appendText(text: string): LunaToolbarText
Append text.
clear(): void
Clear all.
remove(item: LunaToolbarItem): void
Remove item.