Pagination
Divides table rows into a series of pages.
pagination
- Type:
boolean
| {
rowsPerPage?: number
,
rowsPerPageSelect?: boolean|RowsPerPageSelect
,
maxNumberOfVisiblePageButtons?: number
,
displayPrevNext?: boolean
,
displayFirstLast?: boolean
,
displayNumberOfVisibleRows?: boolean
,
styles?: PaginationStyle
,
positions?: PaginationPositions
} - Default: {
rowsPerPage: 10,
rowsPerPageSelect: true,
maxNumberOfVisiblePageButtons: 8,
displayPrevNext: true,
displayFirstLast: true,
displayNumberOfVisibleRows: true,
positions: refer to the PaginationPositions type
}
rowsPerPage
is the number of maximum data rows that can be displayed in a single page.
rowsPerPageSelect
facilitates a rowsPerPage
selection button that opens up a dropdown containing a number of options that the user can select
to change rowsPerPage
.
maxNumberOfVisiblePageButtons
is the maximum number of page (number) buttons that are visible, the rest will be hidden.
displayPrevNext
defines whether the previous and next page buttons are displayed.
displayFirstLast
defines whether the first and last page buttons are displayed.
displayNumberOfVisibleRows
displays information on the index of currently visible rows out of the total number of rows in the table. E.g. 1-5 of 20.
styles
defines the styling properties of pagination components.
positions
defines pagination components positions.
Example
- Sample code
- Full code
<active-table pagination="true"></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination="true"
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Types
Object types for properties inside pagination
:
RowsPerPageSelect
- Type: {
prefixText?: string
,
options?: (number | "all" | "All" )[]
} - Default: {
prefixText: "Rows per page",
options: [10, 25, 50, "All"]
}
Custom settings for the rowsPerPageSelect
property.
prefixText
is the text that is displayed before the button.
options
is the array of options that are displayed in the dropdown. "all"|"All"
option displays all of the table's rows within one page.
If the defined rowsPerPage
value (in pagination
object) is not in the options array, it will be added to it automatically.
Example
- Sample code
- Full code
<active-table
pagination='{
"rowsPerPageSelect": {"prefixText": "Number of rows:", "options": [10, 20, 30, "All"]},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"rowsPerPageSelect": {"prefixText": "Number of rows:", "options": [10, 20, 30, "All"]},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
PaginationStyle
- Type: {
rowsPerPageSelect?: RowsPerPageOptionsStyle
,
numberOfVisibleRows?: CSSStyle
,
pageButtons?: PageButtonStyle
}
Styling properties of pagination components.
rowsPerPageSelect
defines styling properties for the rowsPerPage button container and its dropdown.
numberOfVisibleRows
defines styling properties for the number of visible rows text.
pageButtons
defines styling properties for the page/previous/next/first/last buttons.
Example
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"rowsPerPageSelect": {
"prefixText": {"color": "#174a76"},
"buttonText": {"default":{"color": "#174a76"}},
"buttonArrow": {"default":{"filter": "brightness(0) saturate(100%) invert(22%) sepia(77%) saturate(620%) hue-rotate(168deg) brightness(96%) contrast(95%)"}}
},
"numberOfVisibleRows": {"color": "#174a76"},
"pageButtons": {
"buttons": {
"default": {"color": "steelblue", "stroke": "steelblue", "border":"1px solid #dedede", "borderRight": "unset"}
},
"activeButton": {"default": {"backgroundColor": "steelblue", "color": "white", "border":"1px solid steelblue"}},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "2px", "borderBottomLeftRadius": "2px"},
"lastVisibleButtonOverride": {"borderRight": "1px solid #dedede", "borderTopRightRadius": "2px", "borderBottomRightRadius": "2px"},
"activeButtonPrecedence": true
}},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"rowsPerPageSelect": {
"prefixText": {"color": "#174a76"},
"buttonText": {"default":{"color": "#174a76"}},
"buttonArrow": {"default":{"filter": "brightness(0) saturate(100%) invert(22%) sepia(77%) saturate(620%) hue-rotate(168deg) brightness(96%) contrast(95%)"}}
},
"numberOfVisibleRows": {"color": "#174a76"},
"pageButtons": {
"buttons": {
"default": {"color": "steelblue", "stroke": "steelblue", "border":"1px solid #dedede", "borderRight": "unset"}
},
"activeButton": {"default": {"backgroundColor": "steelblue", "color": "white", "border":"1px solid steelblue"}},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "2px", "borderBottomLeftRadius": "2px"},
"lastVisibleButtonOverride": {"borderRight": "1px solid #dedede", "borderTopRightRadius": "2px", "borderBottomRightRadius": "2px"},
"activeButtonPrecedence": true
}},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
When number of visible rows text contains digits that are in the 100s+, it is advisable to set numberOfVisibleRows
with a minWidth
value that is higher than
32px to stop side components from moving when its digits change.
RowsPerPageOptionsStyle
- Type: {
container?: CSSStyle
,
prefixText?: CSSStyle
,
button?: StatefulCSS
,
buttonText?: StatefulCSS
,
buttonArrow?: StatefulCSS
}
Styling properties for the rows per page component elements. container
is the parent element that encapsulates all of the rows per page elements.
Example
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"rowsPerPageSelect": {
"container": {"marginRight": "1px"},
"prefixText": {"color": "#1f6e97"},
"button": {"default":{"border": "1px solid #9f9f9f"}, "hover":{"backgroundColor": "#fcfcfc"}},
"buttonText": {"default":{"color": "#1f6e97"}, "hover":{"color": "#444444"}, "click":{"color": "#707070"}},
"buttonArrow": {
"default":{"filter": "brightness(0) saturate(100%) invert(31%) sepia(95%) saturate(397%) hue-rotate(155deg) brightness(99%) contrast(92%)"},
"hover":{"filter": "brightness(0) saturate(100%) invert(27%) sepia(0%) saturate(3140%) hue-rotate(277deg) brightness(97%) contrast(100%)"},
"click":{"filter": "brightness(0) saturate(100%) invert(44%) sepia(0%) saturate(4%) hue-rotate(67deg) brightness(100%) contrast(98%)"}
}}},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"rowsPerPageSelect": {
"container": {"marginRight": "1px"},
"prefixText": {"color": "#1f6e97"},
"button": {"default":{"border": "1px solid #9f9f9f"}, "hover":{"backgroundColor": "#fcfcfc"}},
"buttonText": {"default":{"color": "#1f6e97"}, "hover":{"color": "#444444"}, "click":{"color": "#707070"}},
"buttonArrow": {
"default":{"filter": "brightness(0) saturate(100%) invert(31%) sepia(95%) saturate(397%) hue-rotate(155deg) brightness(99%) contrast(92%)"},
"hover":{"filter": "brightness(0) saturate(100%) invert(27%) sepia(0%) saturate(3140%) hue-rotate(277deg) brightness(97%) contrast(100%)"},
"click":{"filter": "brightness(0) saturate(100%) invert(44%) sepia(0%) saturate(4%) hue-rotate(67deg) brightness(100%) contrast(98%)"}
}}},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Because buttonArrow
is an svg icon - its color is set via filter property. You can use the cssfilterconverter tool to generate its values.
PageButtonStyle
- Type: {
container?: CSSStyle
,
buttons?: StatefulCSS
,
activeButton?: StatefulCSS
,
activeButtonPrecedence?: boolean
,
disabledButtons?: StatefulCSS
,
actionButtons?: ActionButtonStyle
,
firstVisibleButtonOverride?: CSSStyle
,
lastVisibleButtonOverride?: CSSStyle
} - Default: {
activeButtonPrecedence: false,
actionButtons: uses the buttons property style,
disabledButtons: partially uses the buttons property style,
actionButtons: partially uses the buttons property style,
firstVisibleButtonOverride: {borderLeft: '1px solid #0000004d', borderTopLeftRadius: '2px', borderBottomLeftRadius: '2px'},
lastVisibleButtonOverride: {borderRight: '1px solid #0000004d', borderTopRightRadius: '2px', borderBottomRightRadius: '2px'}
}
Styling properties for the page buttons component elements.
container
is the parent element that encapsulates all of the buttons.
buttons
is used to styles the buttons with numbers, however its properties are also reused by actionButtons
, disabledButtons
and actionButtons
. Use the TIPs below to help
styles them correctly.
activeButton
is the button with the currently active page number.
activeButtonPrecedence
denotes whether its border properties overcomes the sibling border properties (except radius).
disabledButtons
are buttons that have no events and cannot be clicked. E.g. buttons when there are no data rows or
action buttons when the currently active page number is either the first or the last.
actionButtons
are buttons that change the currently active page number to next, previous, first and last.
firstVisibleButtonOverride
and lastVisibleButtonOverride
are used for overriding the properties of first or last buttons within the container, e.g. setting
the border radius or setting the opposite side border property when the buttons
styles border properties are set for the other.
Eg. when
default properties are "border": "1px solid #dedede", "borderRight": "unset", set lastVisibleButtonOverride
with _"borderLeft":"1px solid #dedede"_
as otherwise the last button is not going to have a border on the right.
Example
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {
"color": "#3682ec", "stroke": "#3682ec", "border":"1px solid #dedede", "borderRight": "unset", "minWidth": "30px"
}},
"activeButton": {"default": {"backgroundColor": "#3682ec", "color": "white", "border":"1px solid #3682ec"}},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "5px", "borderBottomLeftRadius": "5px"},
"lastVisibleButtonOverride": {"borderRight": "1px solid #dedede", "borderTopRightRadius": "5px", "borderBottomRightRadius": "5px"},
"activeButtonPrecedence": true
}},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {
"color": "#3682ec", "stroke": "#3682ec", "border":"1px solid #dedede", "borderRight": "unset", "minWidth": "30px"
}},
"activeButton": {"default": {"backgroundColor": "#3682ec", "color": "white", "border":"1px solid #3682ec"}},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "5px", "borderBottomLeftRadius": "5px"},
"lastVisibleButtonOverride": {"borderRight": "1px solid #dedede", "borderTopRightRadius": "5px", "borderBottomRightRadius": "5px"},
"activeButtonPrecedence": true
}},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
When setting button widths, use minWidth
instead of width
to override the defaults and it is additionally useful to automatically expand
the button widths in situations when their numbers contain multiple digits that surpass the currently defined width dimensions.
When buttons are grouped next to each other and they have borders, set borderRight
to "unset" in the buttons
property to create an appearance of a thin border.
When doing this you will additionally need to set borderLeft
with a pixel value on lastVisibleButtonOverride
as the rightmost button would not have a right border.
When using activeButtonPrecedence
with thin buttons
borders (in the tip above), make sure to set borderRight
to "unset" and not "borderLeft" as the css selector limitations only allow
the active button to unset the left border of the right sibling and not the left.
ActionButtonStyle
- Type: {
StatefulCSS
&
previousText?: string
,
nextText?: string
,
firstText?: string
,
lastText?: string
}
Styling for action buttons that facilitates the definition of styles for various mouse states and the text that is displayed in each one.
Example
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"pageButtons": {
"actionButtons": {
"default": {"width": "50px", "fontSize": "15px", "color": "#1e912a"},
"hover": {"backgroundColor": "#e4ffe4"},
"click": {"backgroundColor": "#81d581"},
"previousText": "Prev",
"nextText": "Next",
"firstText": "First",
"lastText": "Last"
}}
},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"pageButtons": {
"actionButtons": {
"default": {"width": "50px", "fontSize": "15px", "color": "#1e912a"},
"hover": {"backgroundColor": "#e4ffe4"},
"click": {"backgroundColor": "#81d581"},
"previousText": "Prev",
"nextText": "Next",
"firstText": "First",
"lastText": "Last"
}}
},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Action buttons contain icons (by default) - if you want to change their color use the stroke
property, otherwise when they are in text
format like in the example above - use color
.
PaginationPositions
- Type: {
pageButtons?: PaginationPosition
,
numberOfVisibleRows?: PaginationPosition
,
rowsPerPageSelect?: PaginationPosition
} - Default: {
pageButtons: {position: "bottom-right", "order": 3},
numberOfVisibleRows: {position: "bottom-right", "order": 2},
rowsPerPageSelect: {position: "bottom-right", "order": 1}
}
Positions for pagination components.
Example
- Sample code
- Full code
<active-table
pagination='{
"positions": {
"pageButtons": {"position": "bottom-center"},
"numberOfVisibleRows": {"position": "top-left", "order": 2},
"rowsPerPageSelect": {"position": "top-left", "order": 1}
},
"rowsPerPage": 5
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"positions": {
"pageButtons": {"position": "bottom-center"},
"numberOfVisibleRows": {"position": "top-left", "order": 2},
"rowsPerPageSelect": {"position": "top-left", "order": 1}
},
"rowsPerPage": 5
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
PaginationPosition
- Type: {
position?: OuterContentPosition
,
order?: number
} - Default: {
position: "bottom-right",
order: 1
}
Object defining position properties for a pagination component. order
is the order of the component when other ones are also placed in the same position.
More examples
Circle buttons
- Sample code
- Full code
<active-table
pagination='{
"displayFirstLast": false,
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "border":"1px solid #dedede", "marginRight": "5px", "marginTop": "1px", "height": "31px", "width": "31px", "borderRadius": "20px"}},
"activeButton": {"default": {"backgroundColor": "#56b3ff", "color": "white", "border":"1px solid #56b3ff"}},
"disabledButtons": {"default": {"backgroundColor": "white"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"displayFirstLast": false,
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "border":"1px solid #dedede", "marginRight": "5px", "marginTop": "1px", "height": "31px", "width": "31px", "borderRadius": "20px"}},
"activeButton": {"default": {"backgroundColor": "#56b3ff", "color": "white", "border":"1px solid #56b3ff"}},
"disabledButtons": {"default": {"backgroundColor": "white"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Active circle button
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "backgroundColor": "none", "border":"none", "marginRight": "5px", "marginTop": "3px", "height": "31px", "width": "31px", "borderRadius": "20px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white"}},
"actionButtons": {"default": {"border": "none"}},
"disabledButtons": {"default": {"backgroundColor": "white"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "backgroundColor": "none", "border":"none", "marginRight": "5px", "marginTop": "3px", "height": "31px", "width": "31px", "borderRadius": "20px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white"}},
"actionButtons": {"default": {"fontSize": "13px", "paddingTop": "7px", "height": "24px", "border":"none"}},
"actionButtons": {"default": {"border": "none"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Active square button
- Sample code
- Full code
<active-table
pagination='{
"displayFirstLast": false,
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke" :"grey", "backgroundColor": "none", "border":"none", "marginTop": "3px", "borderRadius": "5px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white"}},
"actionButtons": {"default": {"border": "none"}},
"disabledButtons": {"default": {"backgroundColor": "white"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"displayFirstLast": false,
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "backgroundColor": "none", "border":"none", "marginTop": "3px", "borderRadius": "5px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white"}},
"actionButtons": {"default": {"border": "none"}},
"disabledButtons": {"default": {"backgroundColor": "white"}},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Grey background button series
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "border":"unset", "borderRight": "unset", "backgroundColor":"#ececec", "marginTop": "8px"},
"hover": {"backgroundColor":"white"}},
"activeButton": {"default": {"backgroundColor": "#0e59ff", "color": "white"}},
"disabledButtons": {"backgroundColor": "#ececec"},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "5px", "borderBottomLeftRadius": "5px"},
"lastVisibleButtonOverride": {"borderTopRightRadius": "5px", "borderBottomRightRadius": "5px"},
"activeButtonPrecedence": true
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "border":"unset", "borderRight": "unset", "backgroundColor":"#ececec", "marginTop": "8px"},
"hover": {"backgroundColor":"white"}},
"activeButton": {"default": {"backgroundColor": "#0e59ff", "color": "white"}},
"disabledButtons": {"backgroundColor": "#ececec"},
"firstVisibleButtonOverride": {"borderTopLeftRadius": "5px", "borderBottomLeftRadius": "5px"},
"lastVisibleButtonOverride": {"borderTopRightRadius": "5px", "borderBottomRightRadius": "5px"},
"activeButtonPrecedence": true
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
Disabled buttons not displayed
- Sample code
- Full code
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "backgroundColor": "none", "border":"none", "marginTop": "3px", "borderRadius": "5px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white", "boxShadow": "rgb(55 55 55 / 17%) 0px 2px 5px 1px"}},
"actionButtons": {"default": {"border": "none"}},
"disabledButtons": {"visibility": "hidden"},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
></active-table>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<active-table
pagination='{
"styles": {
"pageButtons": {
"buttons": {
"default": {"color": "grey", "stroke": "grey", "backgroundColor": "none", "border":"none", "marginTop": "3px", "borderRadius": "5px"}},
"activeButton": {"default": {"backgroundColor": "#2e72fd", "border":"none", "color": "white", "boxShadow": "rgb(55 55 55 / 17%) 0px 2px 5px 1px"}},
"actionButtons": {"default": {"border": "none"}},
"disabledButtons": {"visibility": "hidden"},
"firstVisibleButtonOverride": {},
"lastVisibleButtonOverride": {}
}},
"rowsPerPageSelect": false,
"displayNumberOfVisibleRows": false,
"positions": {"pageButtons": {"position": "bottom-center"}},
"rowsPerPage": 2
}'
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638],
["Mercury", 4879, 0.33, 0, 5429],
["Venus", 12104, 4.87, 0, 5243],
["Uranus", 51118, 86.8, 27, 1270],
["Pluto", 2376, 0.013, 5, 1850],
["Moon", 3475, 0.073, 0, 3340]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>