Introducing AlienX extension – The next evolution of UI development.Check it out on VS Code
Enjoy AlienUI? Give it a star on Github ⭐
A customizable pagination component.
A default galactic pagination in the galaxy.
import React from "react";
import { View, Text, TouchableOpacity } from "react-native";
import { AntDesign } from "@expo/vector-icons";
const Pagination = () => {
return (
<View className="flex-row gap-2">
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<AntDesign name="left" size={10} color="black" />
</TouchableOpacity>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<Text className="text-gray-800 text-sm font-medium">1</Text>
</TouchableOpacity>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-black rounded bg-black">
<Text className="text-white text-sm font-medium">2</Text>
</TouchableOpacity>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<Text className="text-gray-800 text-sm font-medium">3</Text>
</TouchableOpacity>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<Text className="text-gray-800 text-sm font-medium">4</Text>
</TouchableOpacity>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<AntDesign name="right" size={10} color="black" />
</TouchableOpacity>
</View>
);
};
export default Pagination;
import React from "react";
import { View } from "react-native";
import Pagination from "./components/Pagination/GalaxyPagination";
const App = () => {
return (
<View>
<Pagination />
</View>
);
};
export default App;
Paginating to mars.
import React from "react";
import { View, Text, TouchableOpacity } from "react-native";
import { AntDesign } from "@expo/vector-icons";
const Pagination = () => {
return (
<View className="flex-row items-center gap-3">
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<AntDesign name="left" size={10} color="black" />
</TouchableOpacity>
<Text className="text-xs text-gray-800">
1<Text className="mx-0.5"> / </Text>47
</Text>
<TouchableOpacity className="w-8 h-8 justify-center items-center border border-gray-300 rounded bg-white">
<AntDesign name="right" size={10} color="black" />
</TouchableOpacity>
</View>
);
};
export default Pagination;
import React from "react";
import { View } from "react-native";
import Pagination from "./components/Pagination/MarsPagination";
const App = () => {
return (
<View>
<Pagination />
</View>
);
};
export default App;