Pagination
A component to navigate through paginated content.
Usage
import { Box, Main, Pagination } from '@aragon/ui'
function App() {
const [selected, setSelected] = useState(0)
return (
<Main>
<Box>
<Pagination pages={20} selected={selected} onChange={setSelected} />
</Box>
</Main>
)
}Demonstration

Props
onChange
onChangeTYPE
DEFAULT VALUE
Function: (item: Number) -> *
None
Gets called when the selected page changes. Takes the new index as a unique parameter.
pages
pagesTYPE
DEFAULT VALUE
Number
0
The total amount of pages.
selected
selectedTYPE
DEFAULT VALUE
Number
0
The currently selected page (zero based numbering).
touchMode
touchModeTYPE
DEFAULT VALUE
Boolean
false
When true, adapts the component to touch screens by making the targets bigge
Last updated
Was this helpful?
