Call-Outs

Convert any Webflow blockquote to a stylized callout

Convert any Webflow blockquote to a stylized callout including an icon, font and background color

  • Information: โ„น๏ธ (Information Symbol)

  • Warning: โš ๏ธ (Warning Symbol)

  • Success: โœ… (Check Mark)

  • Caution: โš ๏ธ (Triangle Warning)

  • Error: โŒ (Cross Mark)

  • Note: ๐Ÿ“ (Memo)

  • Tips: ๐Ÿ’ก (Light Bulb)

  • FAQs: โ“ (Question Mark)

  • Quotes: ๐Ÿ—ฃ๏ธ (Speaking Head)

Default

Custom

Styling by color

Create classes

( paste from cloneable )

.sa5-callout-info

Background color, image, side border

, background icon

font, etc.

border-levt

Prefixes;

Default styling

/info

i

Info. Blue.

/warning

!!

Danger. Red.

/caution

!

Caution. Orange.

/note

/faq

?

/feature

$

Success. Green.

Yellow

Purple

Optional first line of text, e.g. "did you know?"

Control with CSS and ::before styling

  • Information: i

  • Warning: !

  • Success: +

  • Caution: *

  • Error: x

  • Note: n

https://codepen.io/memetican/pen/BaeJPwY/6eb9010c97458d0c708ac20b44fb2c39

https://codepen.io/memetican/pen/abrqvpe/17a1a0ec34b7dbfa470b32a4d80ec090

Sygnal Style Guide | Main

Use a theme prefix for classes?

e.g. dark | light

vivid | pastel

.sa5-callout.is-info-pastel

blockquote.callout {
    padding: 1em;
    margin: 1em 0;
    border-radius: 5px;
    position: relative;
    padding-left: 2em;
    font-style: italic;
}

.callout-info {
    background-color: #e7f3fe;
    border-left: 5px solid #2196F3;
}

.callout-warning {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
}

.callout-success {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
}

.callout-error {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
}

.callout-note {
    background-color: #e2e3e5;
    border-left: 5px solid #6c757d;
}

.callout-icon {
    position: absolute;
    left: 10px;
    top: 10px;
    font-size: 1.5em;
}
document.querySelectorAll('blockquote.callout').forEach(blockquote => {
    const text = blockquote.textContent.trim();
    let icon = '';
    let typeClass = '';

    if (text.startsWith('โ„น๏ธ')) {
        typeClass = 'callout-info';
        icon = 'โ„น๏ธ';
    } else if (text.startsWith('โš ๏ธ')) {
        typeClass = 'callout-warning';
        icon = 'โš ๏ธ';
    } else if (text.startsWith('โœ…')) {
        typeClass = 'callout-success';
        icon = 'โœ…';
    } else if (text.startsWith('โŒ')) {
        typeClass = 'callout-error';
        icon = 'โŒ';
    } else if (text.startsWith('๐Ÿ“')) {
        typeClass = 'callout-note';
        icon = '๐Ÿ“';
    }

    if (typeClass) {
        blockquote.classList.add(typeClass);
        blockquote.innerHTML = `<span class="callout-icon">${icon}</span>` + blockquote.innerHTML.slice(icon.length);
    }
});

Last updated