Settings panel.
https://luna.liriliri.io/?path=/story/setting
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-setting/luna-setting.css" />
<script src="//cdn.jsdelivr.net/npm/luna-setting/luna-setting.js"></script>
You can also get it on npm.
npm install luna-setting --save
import 'luna-setting/luna-setting.css'
import LunaSetting from 'luna-setting'
const setting = new LunaSetting(container)
const title = setting.appendTitle('Title')
setting.appendSeparator()
title.detach()
- filter(string | RegExp | AnyFn): Setting filter.
- separatorCollapse(boolean): Whether to collapse separator or not.
Append button.
appendCheckbox(key: string, value: boolean, title: string, description?: string): LunaSettingCheckbox
Append checkbox setting.
Append html setting.
Append text input setting.
Append markdown description.
appendNumber(key: string, value: number, title: string, description: string, options: INumberOptions): LunaSettingNumber
Append number setting.
appendSelect(key: string, value: string, title: string, description: string, options: PlainObj): LunaSettingSelect
Append select setting.
Append separator.
Append title.
Clear all settings.
Remove setting.
- max(number): Max value.
- min(number): Min value.
- range(boolean): Use slider control or not.
- step(number): Interval between legal numbers.