Search
Quick Commands
run:diagnostics Run all system checks
db:connect Connect to primary DB
cache:clear Clear application cache
users:list Show all active users
Notifications

Stay on top of recent system events and updates.

  • Notification avatar
    System Update Available

    Version 2.4.1 is ready to install with new features.

    2 minutes ago

  • AB
    New User Registration

    Alex Brown from Canada has joined the platform.

    15 minutes ago

  • Notification avatar
    Backup Completed

    Daily backup has been successfully completed.

    1 hour ago

  • Notification avatar
    Security Alert

    Unusual login activity detected from new location.

    3 hours ago

  • Notification avatar
    Monthly Report Ready

    Your analytics report for September is now available.

    Yesterday

  • MJ
    Server Maintenance

    Scheduled maintenance will begin at 2:00 AM EST.

    2 days ago

Use Bootstrap Tag Inputs

Modern Tag Inputs for Bootstrap 5

Use Bootstrap Tag turns any text input into an interactive tag editor with keyboard-friendly chip controls, variants, validation states, and utility methods. It is a pure JavaScript plugin that seamlessly matches Bootstrap styling and automatically adapts to WaveDash light and dark modes.

  • Zero Dependencies: Works with plain Bootstrap 5
  • Flexible Input: Accept comma, Enter, or custom separators
  • Smart Validation: Enforce limits, duplicates, and transformation
  • Accessible by Design: Keyboard navigation and ARIA-friendly markup
  • Variants: Match Bootstrap contextual colors
  • Runtime API: Add, remove, read tags programmatically
  • Theme Awareness: Automatic dark mode detection
  • WaveDash Ready: CSS/JS already available via CDN includes
tips_and_updates
Need implementation details? Read the documentation entry for configuration guidance and additional recipes.
Quick Start

WaveDash loads the CSS and JavaScript bundles for Use Bootstrap Tag automatically. Add the data-ub-tag attribute to any text input and the admin helper will initialize it on page load.

<input
    type="text"
    class="form-control"
    value="Laravel,Livewire,PHP"
    data-ub-tag
    data-ub-tag-variant="primary"
/>

The helper defined in resources/js/admin-static.js automatically scans for input[data-ub-tag] and initializes the plugin:

document.addEventListener('DOMContentLoaded', () => {
    window.initializeBootstrapTags();
});
Core Variations
<input
    type="text"
    class="form-control"
    placeholder="Add a tag then press comma or Enter"
    data-ub-tag
/>
<input
    type="text"
    class="form-control"
    placeholder="Enter tags"
    data-ub-tag
    data-ub-tag-max="3"
/>
<input
    type="text"
    class="form-control"
    placeholder="Add a color then press space or Enter"
    data-ub-tag
    data-ub-tag-separator=" "
/>
<input
    type="text"
    class="form-control"
    value="html,css,js,js"
    data-ub-tag
    data-ub-tag-duplicate
/>
Advanced Options
<input
    type="text"
    class="form-control"
    value="HTML,CSS,JS"
    data-ub-tag
    data-ub-tag-transform="input => input.toUpperCase()"
/>
<input
    type="text"
    class="form-control"
    value="left aligned"
    data-ub-tag
    data-ub-tag-x-position="left"
/>
<input class="form-control form-control-sm" data-ub-tag>
<input class="form-control" data-ub-tag>
<input class="form-control form-control-lg" data-ub-tag>
<input
    type="text"
    class="form-control"
    data-ub-tag
    data-ub-tag-no-input-onblur
/>
Bootstrap Validation
Please add at least one tag.
Looks great!

Server-side validation works out of the box — simply apply Bootstrap's is-invalid or is-valid classes to reflect state.

<input
    type="text"
    class="form-control is-invalid"
    data-ub-tag
    placeholder="Add a tag"
/>
Contextual Variants
<input data-ub-tag data-ub-tag-variant="primary">
<input data-ub-tag data-ub-tag-variant="success">
<!-- ... -->
Runtime Methods
API Control

The plugin returns an API instance with helper methods to manage the current tag collection. Use these methods to connect buttons, Livewire events, or AJAX callbacks.

const instance = window.UseBootstrapTag(document.getElementById('tags'))

instance.addValue('react')
instance.removeValue(['vue', 'svelte'])

console.log(instance.getValue())  // "html,css,js"
console.log(instance.getValues()) // ["html", "css", "js"]
Implementation Notes
Initialization

The helper window.initializeBootstrapTags() is defined in the shared admin bundle and runs on page load. Call it manually if you dynamically inject inputs (e.g., via Livewire or AJAX).

Data Attribute Reference
Attribute Description
data-ub-tag Turns the input into a tag editor
data-ub-tag-max Maximum number of tags allowed
data-ub-tag-duplicate Allow duplicate tag values
data-ub-tag-separator Custom separator character(s)
data-ub-tag-transform Supply a transformation function for new inputs
data-ub-tag-variant Contextual color (primary, success, danger, etc.)
data-ub-tag-x-position Position of the remove button (left or right)
data-ub-tag-no-input-onblur Prevent automatically creating a tag when focus leaves the field
dataset Pro Tip: Add Use Bootstrap Tag to long forms in Advanced Forms to provide delightful, high-productivity multi-value inputs.