Version 6.3 Released!

Click to checkout the new features

CSS Styling

Overview

Tabulator is built using an extensive set of CSS classes to make styling your tables as easy as possible.

CSS Classes

The tables below outline the key classes involved in styling Tabulator. You can include your own custom CSS after importing the library to customise its look and feel

Selector Specificity
The lists below only describe the the roles of each class, not the specificity required to override it. In order to change the table styling after the stylesheet has been imported it is recommended that you use the developer tools in the browser to check the exact CSS combinators needed to override a specific property

General

Class Element Description
tabulatorTabulator container element
tabulator-tableholderContain table and scroll bars
tabulator-tableContain table rows
tabulator-loaderAjax loader message holder
tabulator-loader-msgAjax loader message
tabulator-loadingApplied to .tabulator-load-msg to style a loading message
tabulator-errorApplied to .tabulator-load-msg to style an error message
tabulator-placeholderThe containing element for the empty table placeholder
tabulator-arrowStyles arrows used for header sort direction and group open state
tabulator-block-selectApplied to the .tabulator element when the mouse is dragging to prevent accidental text selection
tabulator-movingApplied to rows and columns when they are being moved
tabulator-movingrow-sendingApplied to table when it is sending a row to another table
tabulator-movingrow-receivingApplied to table when it is receiving a row from another table
tabulator-rtlTable is running with a right to left text direction
tabulator-ltrTable is being forced into left to right text direction on a rtl direction page
tabulator-editingApplied to table containing cells being edited

Columns & Headers

Class Element Description
tabulator-headerTable header element
tabulator-header-hiddenApplied to the .tabulator-header element to hide headers when operating in headerless mode
tabulator-headersHold all column headers inside table header
tabulator-calcs-holderHold column calculations row, appears in both header and footer
tabulator-frozen-rows-holderHold rows that are frozen to the top of the table
tabulator-colColumn header (in header row)
tabulator-col-contentHolds the contents for the column header
tabulator-col-titleHolds the text for the column header title
tabulator-col-groupMarks a column header as a group that contains other columns
tabulator-col-group-colsHolds the column headers contained in a column group
tabulator-handleInvisible resize handle on the right of each column header
tabulator-col-resize-guideThe resize guide bar shown when resizing a column with guards enabled
tabulator-title-editorThe input box used for editing titles when the editableTitle option is set
tabulator-header-filterThe containing element for the header filter elements, when the headerFilter option is set
tabulator-row-headerThe cell or column header is part of the row header column
tabulator-sortableApplied to columns with header sorting enabled
tabulator-frozenThe containing element for all frozen columns
tabulator-frozen-leftApplied to frozen columns on the left edge of the table
tabulator-frozen-rightApplied to frozen columns on the right edge of the table
tabulator-row-resize-handleContainer for frozen rows in the header
tabulator-col-verticalApplied to a column header to rotate the text to a vertical orientation
tabulator-col-vertical-flipapplied to a vertical column header to flip the text round 180 degrees

Rows

Class Element Description
tabulator-rowRow of table
tabulator-row-oddOdd numbered row
tabulator-row-evenEven numbered row
tabulator-cellData cell
tabulator-selectableStyling for selectable rows
tabulator-unselectableStyling for unselectable rows
tabulator-selectedCurrently selected row
tabulator-editingApplied to rows containing cells being edited
tabulator-validation-failApplied to cells being edited that have failed validation
tabulator-groupThe header element for a row group
tabulator-group-visibleApplied to .tabulator-group when the group is visible
tabulator-group-level-XApplied to .tabulator-group to denote its level in multi level grouping, the X is replaced with the number of that grouping level
tabulator-group-toggleContaining element for the groups expand/collapse toggle
tabulator-calcsA row that contains column calculations instead of data
tabulator-calcs-topA column calculations row at the top of a group
tabulator-calcs-bottomA column calculations row at the bottom of a group
tabulator-row-handleA cell that is setup as a row handle
tabulator-row-handle-boxcontaining element for the row handle icon
tabulator-row-handle-barone of the bars in the row handle icon
tabulator-row-resize-handleInvisible resize handle on the top and bottom of each row
tabulator-row-resize-guideThe resize guide bar shown when resizing a row with guards enabled
tabulator-responsive-collapseElement to hold collapsed column data in responsive layout mode
tabulator-responsive-collapse-toggleElement to toggle the expanded state of collapsed data

Pagination

Class Element Description
tabulator-footerTabulator footer element
tabulator-paginatorContains the pagination controls
tabulator-pagesContains individual page buttons
tabulator-pagePage selection button

Data Trees

Class Element Description
tabulator-data-tree-controlContains the control element for toggling the collapse state of a data tree
tabulator-data-tree-control-collapseThe collapse symbol for the data tree control element
tabulator-data-tree-control-expandThe expand symbol for the data tree control element
tabulator-data-tree-branchBranch icon for child rows of a data tree parent
tabulator-tree-level-XApplied to .tabulator-row to denote its level in nested tree structures, the X is replaced with the number of that depth of the child row

Printing

Class Element Description
tabulator-print-tableApplied to .tabulator when printing to allow for custom print styling
tabulator-print-fullscreenContaining element used to take up the full height and width of the screen when printing the table
tabulator-print-fullscreen-hideApplied to the body element when printing to hide all other contents on the page

Menus & Popups

Class Element Description
tabulator-popup-containerThe containing element for any floating popup
tabulator-popupA class applied to a tabulator-popup-container to show it is functioning as popup
tabulator-tooltipA class applied to a tabulator-popup-container to show it is functioning as tooltip
tabulator-menuA class applied to a tabulator-popup-container to show it is functioning as a menu
tabulator-menu-itemAn individual list item in a menu
tabulator-menu-item-disabledApplied to a .tabulator-menu-item to denote that it is disabled
tabulator-menu-separatorA list sepearator in the menu list
tabulator-header-menu-buttonClass for styling the trigger button for column header menu

Formatters

Class Element Description
tabulator-traffic-lightContaining element for the traffic light editor circle

Editors

Class Element Description
tabulator-editingApplied to a tabulator-cell when its contents is being edited
tabulator-editableApplied to a tabulator-cell when its contents available for editing (this class may not be 100% reliable when using a function on the editable column definition option)
tabulator-edit-listThe containing element for select and autocomplete editor value lists
tabulator-edit-list-itemAn individual list item
tabulator-edit-list-placeholderAn non-selectable label
tabulator-edit-list-groupA group of related list items

Spreadsheet

Class Element Description
tabulator-spreadsheet-tabsThe holding element for spreadsheet tabs
tabulator-spreadsheet-tabA tab for a spreadsheet
tabulator-spreadsheet-tab-activeApplied to a spreadsheet tab when it is active

Range Selection

Class Element Description
tabulator-rangesApplied to the table container when range selection is enabled
tabulator-range-highlightApplied to a column header or row when a cell in that column is included in a range
tabulator-range-selectedApplied to a column header or row header when that entier row or column is included in a range
tabulator-range-row-headerApplied to the row header cell for a row
tabulator-range-overlayThe containing element for all range area overlays
tabulator-rangeThe overlayed area graphic for a range
tabulator-range-activeApplied to the active range overlay area
tabulator-range-activeApplied to the active range overlay area

SASS Variables

The packaged SASS theme files is included in the project with a number of setup variables to make theming a table even easier.

Overriding Default Variables

All SCSS file variables use the !default property so you can override them from outside the imported source file.

$backgroundColor:#f00; //change background color of table
	
	@import  "tabulator_simple"; //import table scss

General

Variable Default Value Description
backgroundColor#888The background colour of the tabulator element
borderColor#999The border colour of the tabulator element
textSize14The text size for all text in the tabulator

Columns & Headers

Variable Default Value Description
headerBackgroundColor#e6e6e6The background colour for header cells
headerTextColor#555The header cells text colour
headerBorderColor#aaaThe header cells border colour
headerSeparatorColor#999The header row bottom border colour
headerMargin4The size in pixels for the header cells margin
sortArrowActive#666The colour of the column sorter arrow when sorting is active on a column
sortArrowInactive#bbbThe colour of the column sorter arrow when sorting is not active on a column

Rows

Variable Default Value Description
rowBackgroundColor#fffThe background colour of the table rows
rowAltBackgroundColor#e0e0e0The background colour of the even numbered table rows
rowBorderColor#fffThe table row border colour
rowTextColor#333The table row text colour
rowHoverBackground#bbbThe table row background colour when hovered over.
rowSelectedBackground#9ABCEAThe table row background colour when selected.
rowSelectedBackgroundHover#769BCCThe table row background colour when selected and hovered over.
editBoxColor#1D68CDThe border colour of a cell being edited.

Pagination

Variable Default Value Description
footerBackgroundColor#e6e6e6The footer background colour
footerTextColor#555The footer text colour
footerBorderColor#aaaThe footer buttons border colour
footerSeparatorColor#999The footer element top border colour
footerActiveColor#d00The text colour for active pagination buttons

Range Selection

Variable Default Value Description
rangeBorderColor#2975DDRange selection border colour
rangeHandleColor#2975DDRange selection handle colour
rangeHeaderSelectedBackground#3876CARange column header selected backgroud Colour
rangeHeaderSelectedTextColor#FFFFCARange column header selected text Colour
rangeHeaderHighlightBackground#D6D6CARange column header highlighted backgroud Colour
rangeHeaderTextHighlightBackground#0000CARange column header highlighted text Colour
Donate