luna-toolbar
TypeScript icon, indicating that this package has built-in type declarations

0.7.1 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i luna-toolbar

Weekly Downloads

14

Version

0.7.1

License

MIT

Unpacked Size

255 kB

Total Files

26

Last publish

Collaborators

  • surunzi