Skip to content

Indent

A group of sub fields under a toggle, indented with a 2px left rule.

Decision

When Use
Fields that matter only while a checkbox is on Indent.
A general container Not the Indent. It is a visual cue and does not reset the margins inside.

Usage

<div id="recyclingBinSettings" class="stolon-indent stolon-hidden">
    <div class="inputContainer"><label for="txtPath">Recycling bin path</label><input is="emby-input" type="text" id="txtPath" /></div>
</div>
shared.bindReveal('chkEnableRecyclingBin', 'recyclingBinSettings');

Class: stolon-indent.

States and Modifiers

  • bindReveal(checkboxId, targetId, invert) shows or hides the target with the stolon-hidden class, binds once, and applies the current state on every call. Call it after loading the config.

Gotchas

  • Field containers inside keep their own gap.

Reference

Generated from the code by scripts/build-docs.mjs. Edit the code, not this section.

Class What it looks like
stolon-indent Indented group with a thin rule under a toggle's checkbox, so its fields line up with the toggle's label

Example

Example Code

<!-- title: Indent -->
<div class="checkboxContainer">
    <label class="emby-checkbox-label">
        <input type="checkbox" is="emby-checkbox" id="chkRecycle" />
        <span class="checkboxLabel">Use a recycling bin</span>
    </label>
</div>
<div id="recycleSettings" class="stolon-indent stolon-hidden">
    <div class="inputContainer">
        <label for="txtRecyclePath">Recycling bin path</label>
        <input is="emby-input" type="text" id="txtRecyclePath" value="/media/.recycle" />
    </div>
</div>
<script type="module">
const base = await window.__baseReady;
const shared = base.createShared(document.getElementById('view'), 'preview-plugin', 'Preview');
shared.bindReveal('chkRecycle', 'recycleSettings');
</script>