—  v1

Elements

UI elements are standalone components made up of one or more classes and elements.

Buttons

Buttons share one base class, and you can combine style and size combo classes to create your different variations, as long as each of them exists as its own combo class.

button
button
is-accent
button
is-outline
button
is-text
button
is-lg
button
is-sm
cta-wrapper
>
button

The CTA wrapper aligns the button and adds top margin.

Icons

These are useful wether you are adding icons as images or as SVGs inside embeds. When adding as HTML embed, change the SVG's height and width properties to 100%, and the fill/stroke to currentColor (if you needed)

icon

width: 1rem (16px)
height: same

icon
is-tiny
/
icon-size="tiny"

width: 1rem (16px)
height: same

icon
is-small
/
icon-size="small"

width: 1.25rem (20px)
height: same

icon
icon-size=""

width: 1.5rem (24px)
height: same

icon
is-medium
/
icon-size="medium"

width: 2rem (32px)
height: same

icon
is-large
/
icon-size="large"

width: 2.5rem (40px)
height: same

icon
is-huge
/
icon-size="huge"

width: 3rem (48px)
height: same

Form

Form elements. For the label you can use text classes or create a new one.

form_wrapper
form
form_field
This is the description for this input
⌘K
https://
https://
Not a valid input
This is optional description text
This is optional description text
This is optional description text
This is optional description text
This is optional description text
This is optional description text
Radio Rows
Select an Option w/ Description
This is optional description text
This is optional description text
keyboard_arrow_down
date_range
calendar_month
keyboard_arrow_down
keyboard_arrow_down
keyboard_arrow_down
keyboard_arrow_down

It's annoying to manually change the select options, so I made a tool which can do it automatically https://select-input-tool.webflow.io/

Custom Dropdown w/ Checkboxes
Select all that apply
check
Custom Multi-select Input
Custom Multi-select + Custom Instant Search
Multi-select Buttons
Option A
🟢
Option B
🟡
Option C
🔴
Style me
You'll probably want to hide and/or disable it in production. I'll add some HTML that you could use.
Step 1

Duplicate the boxes to add more options. Be sure to keep the attributes and class names the same. input_box and input_boxes are required class names.

Step 2

Add the following code to the header of your page or site.

[draggable] { user-select: none; }
[data-value] { pointer-events: none; }
Step 3

Next up, you can change the styling of boxes which are about to "replaced."

Step 4

If you want to use a hidden/disabled input then you can add the following code to an embed in Webflow. You can change NAME to be anything you like.

<input type="hidden" data-input="drag-order" maxlength="256" name="NAME" data-name="NAME" id="NAME" required>
Step 5

Last, and most importantly, you need to add the following code before the closing </body> tag.

<!-- DRAG N DROP -->
<script>
document.addEventListener('DOMContentLoaded', (event) => {  var dragSrcEl = null;
 
 function handleDragStart(e) {
   this.style.opacity = '0.4';
   
   dragSrcEl = this;    e.dataTransfer.effectAllowed = 'move';
   e.dataTransfer.setData('text/html', this.innerHTML);
 }  function handleDragOver(e) {
   if (e.preventDefault) {
     e.preventDefault();
   }    e.dataTransfer.dropEffect = 'move';
   
   return false;
 }  function handleDragEnter(e) {
   this.classList.add('over');
 }  function handleDragLeave(e) {
   this.classList.remove('over');
 }  function handleDrop(e) {
   if (e.stopPropagation) {
     e.stopPropagation(); // stops the browser from redirecting.
   }
   
   if (dragSrcEl != this) {
     dragSrcEl.innerHTML = this.innerHTML;
     this.innerHTML = e.dataTransfer.getData('text/html');
   }
   
   let orderedBoxes = document.querySelectorAll('.input-box div[data-value="true"]');    let orderList = Array.from(orderedBoxes).map(function(box) {
     return box.innerHTML;
   }).join(',');    let input = document.querySelector('input[data-input="drag-order"]');    input.value = orderList;    return false;
 }  function handleDragEnd(e) {
   this.style.opacity = '1';
   
   items.forEach(function (item) {
     item.classList.remove('over');
   });
 }
 
 let items = document.querySelectorAll('.input-boxes .input-box');
 items.forEach(function(item) {
   item.addEventListener('dragstart', handleDragStart, false);
   item.addEventListener('dragenter', handleDragEnter, false);
   item.addEventListener('dragover', handleDragOver, false);
   item.addEventListener('dragleave', handleDragLeave, false);
   item.addEventListener('drop', handleDrop, false);
   item.addEventListener('dragend', handleDragEnd, false);
 });  // Set initial value of the input field
 let orderedBoxes = document.querySelectorAll('.input-box div[data-value="true"]');
 let orderList = Array.from(orderedBoxes).map(function(box) {
   return box.innerHTML;
 }).join(',');
 let input = document.querySelector('input[data-input="drag-order"]');
 input.value = orderList;
 
});
</script>

For more info gsee the Web.Dev guide for drag and drop

0
0
Step 1

Be sure to keep all the classnames, or update them in your code. They are required for this input to function.

Step 2

Add the following CSS to your page or site settings. Place the on the page to preview changes

Step 3

Change the styling of these elements right in Webflow. To style the handle and hover states edit the custom CSS.

0
Step 4

Last, and most importantly, you need to add the following code before the closing </body> tag.

<!-- RANGE SLIDERS -->
<script>
function rangeSlider() {
 var sliders = document.querySelectorAll('.ms-range-slider');  sliders.forEach(function(slider) {
   var range = slider.querySelector('.input-range-slider-bar'),
       value = slider.querySelector('.input-range-slider-value');    value.innerHTML = range.value;    range.addEventListener('input', function() {
     value.innerHTML = this.value;
   });
 });
}rangeSlider();
</script>

The Simple Range Slider project by Adam Whitte

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
form_message
alert-type
=
info
info
Default
form_message
alert-type
=
success
thumb_up
Success
form_message
alert-type
=
warning
warning
Warning
form_message
alert-type
=
error
report
Error

Components

Commonly used components of this project.

Alerts

Frequently asked questions, or other such things.

alert
alert-type
=
info
info
Alert
Here's some info about what just happened
close

Details

alert
alert-type
=
success
check_circle
Success
That worked great!
close

Details

alert
alert-type
=
warning
warning
warning
Careful, you might get the piston cup
close

Details

alert
alert-type
=
error
report
warning
Careful, you might get the piston cup
close

Details

Avatars

Frequently asked questions, or other such things.

avatar
Jackie Forman
CEO at Company

Basic card: Stats

avatar
cc-vertical
Jackie Forman
CEO at Company

Basic card: Stats

avatar
cc-group

Basic card: Stats

Collapse

Frequently asked questions, or other such things.

collapse

What is Webflow and why is it the best website builder?

Lorem ipsum dolor sit amet, consectetur adipiscing elit id venenatis pretium risus euismod dictum egestas orci netus feugiat ut egestas ut sagittis tincidunt phasellus elit etiam cursus orci in. Id sed montes.

Basic card: Stats

Cards

Some info about how and when to use cards

card
card_content
card_footer
card_footer-item

Card title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Basic card: Stats

card
cc-horizontal
card_content

Card title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Horizontal card: Stats

card
cc-featured
card_content
cc-featured

Featured card: Stats

Drawer

Frequently asked questions, or other such things.

drawer

Navigation

Frequently asked questions, or other such things.

nav
topbar
swift-nav
sidebar
article-nav

Badge

Frequently asked questions, or other such things.

badge

Modal

Frequently asked questions, or other such things.

modal
Open Modal
open_in_full

Popover

Description

toast
alert-type
=
info
info
Popover
Define the task to 2 lines at most
toast
alert-type
=
success
check_circle
Success
Are you sure you want to continue?
toast
alert-type
=
warning
warning
Warning
Are you sure you want to continue?
toast
alert-type
=
error
report
Error
Are you sure you want to continue?

Table

table

Toast

Frequently asked questions, or other such things.

toast
alert-type
=
info
info
Toast shouldn't be more than 2 lines long

Details

toast
alert-type
=
success
check_circle
Toast shouldn't be more than 2 lines long

Details

toast
alert-type
=
warning
warning
Toast shouldn't be more than 2 lines long

Details

toast
alert-type
=
error
report
Toast shouldn't be more than 2 lines long

Details