<Boxh={360}w={320}bg="$backgroundLight50"$dark-bg="$backgroundDark900"borderRadius="$md"><Fabsize="md"placement="bottom right"isHovered={false}isDisabled={false}isPressed={false}><FabIcon as={AddIcon} mr="$1" /><FabLabel>Quick start</FabLabel></Fab></Box>
import { Fab } from "@gluestack-ui/themed"
export default () => (<Fab><FabLabel /><FabIcon /></Fab>)
Prop | Type | Default | Description |
---|---|---|---|
placement | "top left" | "top right" | "bottom left" | "bottom right" | "top
center" | "bottom center" | "bottom right" | Placement of the Fab |
isHovered | bool | false | To manually set hover to the fab. |
isPressed | bool | false | To manually set pressable state to the fab. |
isFocused | bool | false | To manually set focused state to the fab. |
isDisabled | bool | false | To manually set disable to the fab. |
Name | Value | Default |
---|---|---|
size | sm | md | lg | md |
placement | top right | top left | bottom right | bottom left | top center |
bottom center | bottom right |
function App() {const data = [{uri: "https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80",name: "Kevin James",msg: "Hi Rachel, What's up",},{uri: "https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1180&q=80",name: "Jacob Jones",msg: "Good Morning!",},{uri: "https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1180&q=80",name: "Albert Flores",msg: "Coffee?",},]return (<BoxborderColor="$borderLight200"borderRadius="$lg"borderWidth="$1"p="$6"$dark-bg="$backgroundDark900"$dark-borderColor="$borderDark800"$base-minWidth={240}$sm-minWidth={360}$md-minWidth={476}><VStack space="md">{data.map((chatData) => {return (<HStack space="sm" alignItems="center"><Avatar size="sm"><AvatarImagesource={{uri: chatData.uri,}}/></Avatar><VStack><Heading size="xs">{chatData.name}</Heading><Text size="xs">{chatData.msg}</Text></VStack></HStack>)})}</VStack><Fab bg="$emerald600" size="lg">{/* EditIcon is imported from 'lucide-react-native' */}<FabIcon as={EditIcon} /></Fab></Box>)}
<BoxmaxWidth="$96"borderColor="$borderLight200"rounded="$lg"borderWidth="$1"py={56}px="$6"$base-mx="$5"$dark-bg="$backgroundDark900"$dark-borderColor="$borderDark800"><Fab bg="$indigo600" height="$9" top="$4"><FabIcon as={SearchIcon} mr="$1.5" /><FabLabel>Search</FabLabel></Fab><VStack space="lg"><Box><TextfontSize="$xs"color="$darkBlue600"fontWeight="$bold"$dark-color="$darkBlue400">HEALTH</Text><Heading size="sm">Benefits of Oranges</Heading><Text size="xs" mt="$1.5">Oranges are a great source of vitamin C, which is essential for ahealthy immune system.</Text><HStack space="sm" mt="$3" h="$5"><Text size="xs">Wade Warrem</Text><Dividerorientation="vertical"bg="$backgroundLight300"$dark-bg="$backgroundLight700"/><Text size="xs">6th Oct, 2019</Text><Dividerorientation="vertical"bg="$backgroundLight300"$dark-bg="$backgroundLight700"/><Text size="xs">5 mins read</Text></HStack></Box><Divider /><Box><TextfontSize="$xs"color="$darkBlue600"fontWeight="$bold"$dark-color="$darkBlue400">TECHNOLOGY</Text><Heading size="sm">How AI can benefit your business</Heading><Text size="xs" mt="$1.5">AI can automate tasks and processes, allowing for increasing efficiencyand productivity.</Text><HStack space="sm" mt="$3" h="$5"><Text size="xs">Wade Warrem</Text><Dividerorientation="vertical"bg="$backgroundLight300"$dark-bg="$backgroundLight700"/><Text size="xs">6th Oct, 2019</Text><Dividerorientation="vertical"bg="$backgroundLight300"$dark-bg="$backgroundLight700"/><Text size="xs">5 mins read</Text></HStack></Box></VStack></Box>
<BoxborderColor="$borderLight300"rounded="$lg"borderWidth="$1"py="$4"bg="$white"$base-mx="$5"$dark-bg="$backgroundDark900"$dark-borderColor="$borderDark800"><VStack mb="$2" px="$6" py="$2" space="lg"><Checkbox size="sm"><CheckboxIndicator mr="$2"><CheckboxIcon as={CheckIcon} /></CheckboxIndicator><CheckboxLabel><Text fontSize="$sm">Prepare any feedback or updates.</Text></CheckboxLabel></Checkbox><Checkbox size="sm"><CheckboxIndicator mr="$2"><CheckboxIcon as={CheckIcon} /></CheckboxIndicator><CheckboxLabel><Text fontSize="$sm">Review progress on goals and projects.</Text></CheckboxLabel></Checkbox><Checkbox size="sm"><CheckboxIndicator mr="$2"><CheckboxIcon as={CheckIcon} /></CheckboxIndicator><CheckboxLabel><Text fontSize="$sm">Ask challenges and discuss.</Text></CheckboxLabel></Checkbox></VStack><Fab size="sm" placement="bottom center" top="0" position="relative"><FabIcon as={AddIcon} size="sm" /></Fab></Box>
<BoxmaxWidth="$96"borderColor="$borderLight200"borderRadius="$lg"borderWidth="$1"overflow="hidden"$base-mx="$5"$dark-bg="$backgroundDark900"$dark-borderColor="$borderDark800"><Box><Imageh={185}w={416}source={{uri: "https://drive.google.com/uc?export=view&id=1h1e89BtQCp6JdGiKo92dlf5bjHC8hLjt",}}fallbackSource={{uri: "https://drive.google.com/uc?export=view&id=1h1e89BtQCp6JdGiKo92dlf5bjHC8hLjt",}}/></Box><VStack px="$6" pt="$4" pb="$6"><Heading size="sm">Fresh Orange - Imported (Loose)</Heading><Text fontSize="$sm" my="$1.5">Rs 146(Rs.24.33/pc)</Text><Text fontSize="$xs">DETAILS</Text><Text fontSize="$xs" my="$1.5">Oranges are a great source of vitamin C, which is essential for a healthyimmune system. Oranges are a great source of vitamin C, which is importantfor maintaining a healthy immune system. Vitamin C also helps with theabsorption of iron and the production of collagen, which supports healthyskin, teeth, and bones.</Text><Link href="https://v1.gluestack.io/" isExternal><Text fontSize="$xs" color="$pink600">READ MORE</Text></Link></VStack><Fab bg="$pink600" size="lg" right="$4" bottom="$20">{/* ShoppingCartIcon is imported from 'lucide-react-native' */}<FabIcon as={ShoppingCartIcon} h="$4" w="$4" /></Fab></Box>
// import the stylesimport { Root, Label } from "../components/core/fab/styled-components"// import the createFab functionimport { createFab } from "@gluestack-ui/fab"// Understanding the APIconst Fab = createFab({Root,Label,})// Using the fab componentexport default () => (<Fab><FabLabel /><FabIcon /></Fab>)