Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
    <div class="row">
        <input type="text" class="input" data-bonded-id="1">
        <div class="output" data-bonded-id="1"></div>
    <div class="row">
        <input type="text" class="input" data-bonded-id="2">
        <div class="output" data-bonded-id="2"></div>
    <div class="row">
        <input type="text" class="input"  data-bonded-id="3">
        <div class="output" data-bonded-id="3"></div>
    <div class="row">
        <input type="text" class="input" data-bonded-id="4">
        <div class="output" data-bonded-id="4"></div>
    <div class="row">
        <input type="text" class="input" data-bonded-id="5">
        <div class="output" data-bonded-id="5"></div>


    display: flex
    margin: 20px
        flex-basis: 150px
        flex-grow: 1
        padding: 10px
        flex-basis: 150px
        flex-grow: 2
        border: 1px solid #888
        background-color: #dedede
        margin-left: 15px
        padding: 10px


                // Классы инпутов и оутпутов и имя дата-атрибута для их связи
let fields_props = {
    input: '.input',
    output: '.output',
    dataAttr: 'data-bonded-id'

class BoundedFields {
    constructor(fields_props) {
        this.inputs = document.querySelectorAll(fields_props.input);
        this.dataAttr = fields_props.dataAttr;
        this.outputSelector = fields_props.output;
    itputHandler(input) {
        let boundedId = input.getAttribute(this.dataAttr);
        let boundedOutputSelector = `${this.outputSelector}[${this.dataAttr}="${boundedId}"]`;       
        let outputElem = document.querySelector(boundedOutputSelector);
        if(outputElem) outputElem.textContent = input.value;
    init() {
        this.inputs.forEach(input => {
            input.addEventListener('input', e => this.itputHandler(;

window.boundedFields = new BoundedFields(fields_props);