labels - Mobius1/Vanilla-DataTables GitHub Wiki

labels

Type: object

Customise the displayed labels. (v1.0.6 and above)

Defaults

labels: {
    placeholder: "Search...",
    perPage: "{select} entries per page",
    noRows: "No entries to found",
    info: "Showing {start} to {end} of {rows} entries",
}

The strings wrapped in curly braces represent variables that are inserted.

Property Effect Variables
placeholder Sets the placeholder of the search input None
perPage Sets the per-page dropdown's label {select} - the per-page dropdown (required)
noRows The message displayed when there are no search results None
info Displays current range, page number, etc {start} - The first row number of the current page
{end} - The last row number of the current page
{page} - The current page number
{pages} - Total pages
{rows} - Total rows

Example:

labels: {
    placeholder: "Search employees...",
    perPage: "Show {select} employees per page",
    noRows: "No employees to display",
    info: "Showing {start} to {end} of {rows} employees (Page {page} of {pages} pages)",
},
⚠️ **GitHub.com Fallback** ⚠️