These are your standard text colors.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
These are your project font weight classes. Please note they are only available based on the Google Font weights you specified in your settings.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
No kidding, Lorenzo called off his trip to Mexico City just because they told him the conquistadors were extinct.
These are your expanded text sizes.
These are your expanded border widths.
These are your element box shadow options.
These are your element box shadow hover effect options.
These are your text shadow options.
These are your ordered list element options.
These are your unordered list element options.
These are examples of different custom dropdown select components. These use the Bootstrap 4 dropdown menu functionality, and some custom scripting allowing the component to visually simulate a select element by using a hidden form input element in place of a traditional select element. You can either use the default markup which instantiates the plugin automatically when using a '.dropdown-select' set of classes (perfect for using a dropdown select instead of a standard select.) Conversely, you can instantiate the plugin on your own component with your own classes, event names, selectors, and more. Using this method, you can also add/use multiple data attributes on each dropdown select option! ;)
<div class="form-group">
<label>Custom Classes & Submittable:</label>
<div class="ddSelect btn-group w-100">
<div class="d-flex justify-content-between align-items-center border rounded w-100 p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" role="listbox">
<div class="ddSelect-target">
<div class="py-2 px-3">Select An Option</div>
</div>
<div class="py-2 px-3">⇣</div>
</div>
<div class="dropdown-menu py-0 w-100">
<div class="ddSelect-option py-2 px-3" data-value="One">Abstract One</div>
<div class="ddSelect-option py-2 px-3" data-value="Two">Abstract Two</div>
<div class="ddSelect-option py-2 px-3" data-value="Three">Abstract Three</div>
<div class="ddSelect-option py-2 px-3" data-value="Four">Abstract Four</div>
<div class="ddSelect-option py-2 px-3" data-value="Five">Abstract Five</div>
</div>
</div>
<input type="hidden" name="ddSelect-input" value="">
<small class="form-text text-muted">This implementation uses a custom instantiation of the plugin to allow for programatic customization.</small>
</div>
// jQuery initialization of the OBE:BS4 Dropdown Select Plugin
// (With options for matching any custom class/id requirements you may have)
$('.ddSelect').obeDropdownSelect({
formMode : true,
parentSelector : '.ddSelect',
optionSelector : '.ddSelect-option',
cloneTargetSelector : '.ddSelect-target',
dataAttributeString : 'value',
});
<!-- Plugin/Customized Dropdown Select Markup Example -->
<div class="form-group">
<label>Plugin Dropdown Select:</label>
<div class="ddSel btn-group w-100">
<div class="d-flex justify-content-between align-items-center border rounded w-100 p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" role="listbox">
<div class="cloned-ddSel">
<div class="py-2 px-3">Select An Option</div>
</div>
<div class="py-2 px-3">⇣</div>
</div>
<div class="dropdown-menu py-0 w-100">
<div class="ddSel-opt py-2 px-3" data-value="One" data-number="1">Abstract One</div>
<div class="ddSel-opt py-2 px-3" data-value="Two" data-number="2">Abstract Two</div>
<div class="ddSel-opt py-2 px-3" data-value="Three" data-number="3">Abstract Three</div>
<div class="ddSel-opt py-2 px-3" data-value="Four" data-number="4">Abstract Four</div>
<div class="ddSel-opt py-2 px-3" data-value="Five" data-number="5">Abstract Five</div>
</div>
</div>
<small class="form-text text-muted">Plugin dropdown Select help text.</small>
</div>
// jQuery initialization of the OBE:BS4 Dropdown Select Plugin
// (With options for matching any custom class/id requirements you may have)
$('.ddSel').obeDropdownSelect({
formMode : false,
parentSelector : '.ddSel',
optionSelector : '.ddSel-opt',
cloneTargetSelector : '.cloned-ddSel',
dataAttributeString : 'value',
customEventString : 'ddSel.clicked'
});
// Custom event example (named in settings above)
// Access 2 (or more) data attributes from a single option selection
$('.ddSel').on( 'ddSel.clicked', '.ddSel-opt', function(event) {
let option = $(event.target);
let value = option.data('value');
let number = option.data('number');
console.log('Selected Option Value: ' + value);
console.log('Selected Option Number: ' + number);
});
// Complete List of OBE:BS4 Dropdown Select Options and Defaults
$('SELECTOR-FOR-DROPDOWN-SELECT-HERE').obeDropdownSelect({
formMode : true, // choices are true or false, where true will allow you to write the selected option value to a hidden input in the markup to submit via GET/POST, and where false avoids writing anything to an input entirely for UI interactions that don't need to be submitted to a server
parentSelector : '.dropdown-select', // the parent selector class for the dropdown component (NOTE: this should ideally be a child of a .form-group element)
optionSelector : '.dropdown-select-option', // the class selector for each dropdown select option
cloneTargetSelector : '.dropdown-select-target', // the class selector for the element that will receive a markup clone of the selected dropdown option
dataAttributeString : 'option-value', // the data attribute string value used on each .dropdown-select-option element (Sans the 'data-' prefix of course!)
hiddenInputSelector : 'input[type=hidden]', // selector to target the (usually hidden) input with the value of the selected option (for GET/POST submissions)
customEventString : 'dropdown.select.selected' // the string name of the custom event you'd want to listen for to extend the functionality based on a user's interaction
});
These are a set of modal utility classes and options that will allow you to use modals more creatively and impactfully.
These are form elements that leverage Google's Material Design guidelines using the Bootstrap 4 styled naming conventions and utilities.
These are opacity classes to allow for an artistic range of color blending possibilities.
These are your element width options and classes.
These are your element height options and classes.
These are examples of different uses of the OBE:BS4 Calendar Datepicker Plugin. You can use these components to enhance the user experience whenever you need a user to specify a date in your application.
<!-- Date Picker (Compact Mode) Markup -->
<div class="form-group">
<label for="datepicker-1-input text-left">Date Picker (Compact Mode):</label>
<div class="input-group">
<input type="text" class="form-control" placeholder="MM/DD/YYYY" id="datepicker-1-input" name="datepicker-1-input" aria-describedby="datepicker-2-input-help">
<div class="input-group-append" data-toggle="collapse" data-target="#datepicker-1-collapse" aria-expanded="false" aria-controls="datepicker-2-collapse">
<button class="btn btn-outline-secondary" type="button">PICKER</button>
</div>
</div>
<div id="datepicker-1-collapse" class="collapse pt-1">
<div class="obe-calendar-datepicker-1 text-center"></div>
</div>
<small id="datepicker-1-input-help" class="form-text text-muted">Click 'PICKER' to use a visual date picker.</small>
</div>
// JavaScript initialization of the OBE:BS4 Calendar Datepicker Plugin (with options)
$('.obe-calendar-datepicker-1').obeDatepicker({
outputSelector : '#datepicker-1-input',
compactMode : true
});
<!-- Date Picker (Full Mode) Markup -->
<div class="form-group">
<label for="datepicker-2-input text-left">Date Picker (Full Mode):</label>
<div class="input-group">
<input type="text" class="form-control" placeholder="MM/DD/YYYY" id="datepicker-2-input" name="datepicker-2-input" aria-describedby="datepicker-2-input-help">
<div class="input-group-append" data-toggle="collapse" data-target="#datepicker-2-collapse" aria-expanded="false" aria-controls="datepicker-2-collapse">
<button class="btn btn-outline-secondary" type="button">PICKER</button>
</div>
</div>
<div id="datepicker-2-collapse" class="collapse pt-1">
<div class="obe-calendar-datepicker-2 text-center"></div>
</div>
<small id="datepicker-2-input-help" class="form-text text-muted">Click 'PICKER' to use a visual date picker.</small>
</div>
// JavaScript initialization of the OBE:BS4 Calendar Datepicker Plugin (with options)
$('.obe-calendar-datepicker-2').obeDatepicker({
outputSelector : '#datepicker-2-input',
outputFormat : 'MM-DD-YYYY',
outputType : 'input',
compactMode : false,
baseColors : 'bg-gradient-azure-violet-vertical text-white',
selectedBg : 'bg-gradient-yellow-orange-vertical text-dark opacity-100',
standardBg : 'text-shadow',
borders : 'border-dark',
prevNextBg : 'bg-dark text-light opacity-50',
theadBg : 'opacity-85',
leftArrow : '❬',
rightArrow : '❭',
weekdayParentClasses : 'd-flex justify-content-center align-items-center text-center pt-4 text-shadow',
dayParentClasses : 'd-flex justify-content-center align-items-center text-center pb-2 text-shadow',
monthParentClasses : 'd-flex justify-content-center align-items-center text-center text-shadow',
yearParentClasses : 'd-flex justify-content-center align-items-center text-center pb-4 text-shadow'
});
// Complete List of OBE:BS4 Calendar Datepicker Options and Defaults
$('SELECTOR-FOR-DATEPICKER-TO-RENDER-WITHIN-HERE').obeDatepicker({
outputSelector : 'SELECTOR-FOR-DATEPICKER-DATA-OUTPUT-HERE',
outputType : 'input', // choices are 'input' or 'text'
outputFormat : 'MM/DD/YYYY', // choices are 'MM/DD/YYYY', 'MM-DD-YYYY', 'DD/MM/YYYY', 'DD-MM-YYYY', 'YYYY/MM/DD', or 'YYYY-MM-DD'
compactMode : false,
baseColors : 'bg-light text-dark',
cellSpacing : 'p-2',
selectedBg : 'bg-primary text-white',
standardBg : 'text-dark',
borders : 'border-dark',
prevNextBg : 'bg-secondary text-light',
theadClass : 'thead-dark',
theadBg : 'text-light',
leftArrow : '‹', // Use any character including an HTML entity character
rightArrow : '›', // Use any character including an HTML entity character
weekdayParentClasses : 'd-flex justify-content-center align-items-center text-center pt-4',
weekdayMinusClasses : 'flex-fill text-right lead font-weight-bold pr-4 opacity-30',
weekdayTextClasses : 'lead font-weight-bold p-0 m-0',
weekdayPlusClasses : 'flex-fill text-left lead font-weight-bold pl-4 opacity-30',
dayParentClasses : 'd-flex justify-content-center align-items-center text-center pb-2',
dayMinusClasses : 'flex-fill display-1 pr-4 opacity-30',
dayTextClasses : 'p-0 m-0 display-1 font-secondary',
dayPlusClasses : 'flex-fill display-1 pl-4 opacity-30',
monthParentClasses : 'd-flex justify-content-center align-items-center text-center',
monthMinusClasses : 'flex-fill text-right lead font-weight-bold pr-4 opacity-30',
monthTextClasses : 'lead font-weight-bold p-0 m-0',
monthPlusClasses : 'flex-fill text-left lead font-weight-bold pl-4 opacity-30',
yearParentClasses : 'd-flex justify-content-center align-items-center text-center pb-4',
yearMinusClasses : 'flex-fill text-right lead font-weight-bold pr-4 opacity-30',
yearTextClasses : 'lead font-weight-bold p-0 m-0',
yearPlusClasses : 'flex-fill text-left lead font-weight-bold pl-4 opacity-30'
});
A simple plugin that adds the ability to dynamically toggle text by adding a single data atrribute and value on an element.
PLEASE NOTE:
This script converts specific characters ( &, <, >, ", and ' ) to HTML entity values during the swaps to prevent any issues when toggling text content using those characters.
Additionally, this script emits a JavaScript Custom Event. If you'd like to hook into this event to add custom functinality, you'd want to listen for either the 'before.text.toggle' or 'after.text.toggle' custom events in your code.
If you're looking to work with the data being toggled, the JavaScript Custom Events 'before.text.toggle' and 'after.text.toggle' both provide a standard details: {...} object to work with. You can use the code examples below to see how to access the unescaped displayed and stored data in the details: {...} object in either custom event.
// Example of using the before.text.toggle custom event
your_element_node.addEventListener('before.text.toggle', function(event) {
console.log('Displayed String: ' + event.detail.data.displayed);
console.log('Stored String: ' + event.detail.data.stored);
});
// Example of using the after.text.toggle custom event
your_element_node.addEventListener('after.text.toggle', function(event) {
console.log('Displayed String: ' + event.detail.data.displayed);
console.log('Stored String: ' + event.detail.data.stored);
});
Additionally, there are mouseover & mouseout listeners added to each initialized element to change the cursor to a pointer upon a user :hover interaction.
PLEASE NOTE:
The functionality of this plugin is dependent upon the OBE:BS4 Toggle Text Mini-Plugin!
This plugin allows you to pair a button that can toggle virtually any string between two values, which is what the Toggle Text Mini-Plugin provides. This plugin simply passes that value to hidden input, so the value a user selects can be sent with other form data for processing.
Just like with the Toggle Text Mini-Plugin, this plugin fires a couple of events from the toggle text functionality. This plugin also fires 2 additional events that you can hook into. Both before.input.toggle and after.input.toggle will give you both values at before and after stages of the swap.
// Example of using the before.input.toggle custom event
your_element_node.addEventListener('before.input.toggle', function(event) {
console.log('Displayed String: ' + event.detail.data.displayed);
console.log('Stored String: ' + event.detail.data.stored);
});
// Example of using the after.input.toggle custom event
your_element_node.addEventListener('after.input.toggle', function(event) {
console.log('Displayed String: ' + event.detail.data.displayed);
console.log('Stored String: ' + event.detail.data.stored);
});
In a sense, this is a lot like a radio button that has only 2 choices, and can be paired with an input! Using this for AM/PM or °F/°C along with a user-defined and formatted number(s)!
These are examples of different uses of the highly customizable OBE:BS4 Increment Counter Component Plugin. There are nearly infinite ways to use the plugin for both horizontal and vertical increment counter UI needs.
PLEASE NOTE:
This highly versitle plugin allows you to provide users with a click/tap friendly incremental counter component. You can customize the counter's minimum/maximum allowed number range, set a specific in/decrement number, add a leading and/or trailing unit string(s), and set a limit to decimal places!
Here's a handy table breaking down the different data required and optional attribute this component's markup:
Name | Component Element | Req/Opt | Value Type | Notes |
---|---|---|---|---|
data-obe-increment-component | .input-group | Required | No value needed | |
data-obe-increment-up | Child of .input-group | Required | No value needed | Needs required child button element for accessibilty |
Input Element | Child of .input-group | Required | Value matching schema of attributes | Data Attribute Options: data-min, data-max, data-increment, data-leading-units, data-trailing-units, data-decimal-places, data-use-seperators |
data-obe-increment-down | Child of .input-group | Required | No value needed | Needs required child button element for accessibilty |
data-min | Input child of .input-group | Required | Number | Usable Number Types: Positive, Negative, Decimals |
data-max | Input child of .input-group | Required | Number | Usable Number Types: Positive, Negative, Decimals |
data-increment | Input child of .input-group | Optional | Number | Usable Number Types: Positive, Decimals If no data-increment attribute is provided, the default value will be increment value will be 1. |
data-leading-units | Input child of .input-group | Optional | String | String that will be prepended to the calculated value just before display. |
data-trailing-units | Input child of .input-group | Optional | String | String that will be appended to the calculated value just before display. |
data-decimal-places | Input child of .input-group | Optional | Number | Usable Number Types: 0 or a positive whole number If no data-decimal-places attribute is provided, the default value will be 0 decimal places (IE whole numbers / integers) |
data-use-seperators | Input child of .input-group | Optional | No value needed | Adding this attribute will result in number formatting (typically with thousandths seperators in the US) that changes depending on the location of the user in the world. |
There are several custom events that fire depending on the user interaction that triggers the event. Either way, the events from component sub elements bubble, as well as triggering a custom event on the initialized component element. All events carry the data calculated through each calculation of an interaction as well as all of the plugin data attribute values that shape the calculations and results.
An up/plus button click dispaches an increment.up.clicked custom event. The down/minus button click dispaches an increment.down.clicked custom event. Any manual change to the input dispaches an increment.input.changed custom event. All of these sub-component custom events occur after the calculations and DOM have been updated.
Each of the custom events above bubble. However, they also trigger a custom event on the initialized component itself called after.counter.incremented, which ripples the data up through to the component level, regardless of the interaction. So you can get a snapshot of all of the data (including the event name the sub-element dispached) for each interaction from the component level.
Here are some examples of accessing custom event details data:
// Example of using the after.counter.incremented custom event
your_element_node.addEventListener('after.counter.incremented', function(e) {
console.log('Sub-Component Trigger Event Name: ' + e.detail.value.trigger);
console.log('Component Range Minimum: ' + e.detail.value.min);
console.log('Component Increment Value: ' + e.detail.value.increment);
console.log('Component Leading Units: ' + e.detail.value.leadingUnits);
console.log('Component Trailing Units: ' + e.detail.value.trailingUnits);
console.log('Component Decimal Places: ' + e.detail.value.decimalPlaces);
console.log('Calclation Starting Value: ' + e.detail.value.initial);
console.log('Calclation Cleaned Value: ' + e.detail.value.cleaned);
console.log('Calclation Numeric Result Value: ' + e.detail.value.number);
console.log('Calclation Final String Value: ' + e.detail.value.final);
});
// Example of using the increment.up.clicked custom event
your_element_node.addEventListener('increment.up.clicked', function(e) {
// your code here...
});
// Example of using the increment.down.clicked custom event
your_element_node.addEventListener('increment.down.clicked', function(e) {
// your code here...
});
// Example of using the increment.input.changed custom event
your_element_node.addEventListener('increment.input.changed', function(e) {
// your code here...
});