GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.nativebase.io — Slide | NativeBase | Universal Components for React and React Native

Slide | NativeBase | Universal Components for React and React Native

NativeBase
3.4.x
🎉 Prompt to React Native UI
→
Search
⌘
K
Hire us
NativeBase
Introduction
Getting Started
Installation
Setup NativeBase Provider
Migration
Upgrading to v3
Upgrading to 3.2.0 from 3.x
Upgrading to 3.4.0 from 3.3.x
Components Migration
ActionSheet
Badge
Button
Card
Checkbox
DatePicker
DeckSwiper
Drawer
FABs
FooterTab
Form
Header
Icon
Layout
Picker
Radio Button
Searchbar
Segment
Spinner
SwipeList
Tabs
Thumbnail
Toast
Typography
Resources
Contribution
Creating a Universal App with NativeBase and Solito
Core Concepts
Utility First
Utility Props Specificity
Design Tokens
Pseudo Props: Overview
Pseudo Props: Dos & Don'ts
Internal Pseudo Props
Responsive
Features
Utility Props
Color mode (Dark Mode)
NativeBase Factory
SafeAreaView Props
Strict Mode
Accessibility
Theme
Default Theme
Customizing Theme
Customizing Fonts
Customizing Components
Making components dark mode compatible
Breakpoints
Using Theme
TypeScript
Layout
AspectRatio
Box
Center
Container
Flex
HStack / Row
Stack
VStack / Column
ZStack
Forms
Button
Pressable
Checkbox
FormControl
IconButton
Input
Link
Radio
Select
Slider
Switch
TextArea
Data Display
Badge
Divider
Feedback
Alert
Progress
Skeleton
Spinner
Toast
Typography
Text
Heading
Overlay
AlertDialog
Menu
Modal
Popover
Tooltip
Disclosure
ActionSheet
Media and Icons
Avatar
Icon
Image
Transition
PresenceTransition
Slide
Stagger
Others
Fab
Hidden
ReactNative Components
ScrollView
View
KeyboardAvoidingView
StatusBar
FlatList
SectionList
Hooks
useDisclose
useBreakpointValue
useClipboard
useMediaQuery
useTheme
useToken
useColorMode
useColorModeValue
useContrastText
useAccessibleColors
Examples
Todo-List
Kitchen Sink
Recipes
Designs
AppBar
Card
Drawer Navigation
Tab View
Swipe List
Forms
Form with Validation
Login/Signup Forms
SearchBar
Layout
App Drawer
Footer
More
Changelog
Testing
FAQ's
More Props
If you are starting a new project, please try gluestack-ui for better performance and new design.
Slide
Slide component provides a declarative API to add sliding transitions.
Show Code
Playground
const Example = () => {
const [isOpenTop, setIsOpenTop] = React.useState(false);
const str = `${isOpenTop ? 'Hide' : 'Check Internet Connection'}`;
return <Box h="32" w="300">
<Slide in={isOpenTop} placement="top">
<Alert justifyContent="center" status="error">
<Alert.Icon />
<Text color="error.600" fontWeight="medium">
No Internet Connection
</Text>
</Alert>
</Slide>
<Button mt="auto" onPress={() => setIsOpenTop(!isOpenTop)} variant="unstyled" bg="coolGray.700:alpha.30">
{str}
</Button>
</Box>;
};
Import
Examples
Slide
Playground
const Example = () => {
const [isOpenTop, setIsOpenTop] = React.useState(false);
const str = `${isOpenTop ? "Hide" : "Check Internet Connection"}`;
return <Center h="32">
<Slide in={isOpenTop} placement="top">
<Alert justifyContent="center" status="error" safeAreaTop={8}>
<Alert.Icon />
<Text color="error.600" fontWeight="medium">
No Internet Connection
</Text>
</Alert>
</Slide>
<Button onPress={() => setIsOpenTop(!isOpenTop)} variant="unstyled" bg="coolGray.700:alpha.30" _text={{
color: useColorModeValue("darkText", "lightText")
}}>
{str}
</Button>
</Center>;
};
Slide wrapped inside parent
Playground
const Example = () => {
const [isOpen, setIsOpen] = React.useState(false);
return <Center>
<Box w={["250", "300"]} justifyContent="center">
<VStack space={3}>
<HStack alignItems="flex-end">
<Heading>Order</Heading>
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Sub Total</Text>
<Text color="blueGray.400">$298.77</Text>
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Tax</Text>
<Text color="blueGray.400">$38.84</Text>
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Total Amount</Text>
<Text color="emerald.600">$337.61</Text>
</HStack>
<VStack space={2} mt="2">
<Text bold>Promo Code</Text>
<HStack space={3}>
<Input flex="1" />
<Button variant="outline">Apply</Button>
</HStack>
</VStack>
<Button my="2" onPress={() => setIsOpen(!isOpen)}>
Place Order
</Button>
</VStack>
<Slide in={isOpen} placement="top">
<Box w="100%" position="absolute" p="2" borderRadius="xs" bg="emerald.100" alignItems="center" justifyContent="center" _dark={{
bg: "emerald.200"
}} safeArea>
<HStack space={2}>
<CheckIcon size="4" color="emerald.600" mt="1" _dark={{
color: "emerald.700"
}} />
<Text color="emerald.600" textAlign="center" _dark={{
color: "emerald.700"
}} fontWeight="medium">
Order Placed Successfully.
</Text>
</HStack>
</Box>
</Slide>
</Box>
</Center>;
};
Slide Composition
Playground
const Example = () => {
const [isOpen, setIsOpen] = React.useState(false);
const safeAreaProps = useSafeArea({
safeAreaTop: true
});
return <Center>
<Box w={["250", "300"]}>
<Box w="100%" alignItems="flex-start" justifyContent="center">
<VStack space={3} w="100%">
<HStack alignItems="flex-end">
<Heading>Order</Heading>
<Spacer />
<WarningIcon color="orange.600" size="xs" mb="1.5" />
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Sub Total</Text>
<Text color="blueGray.400">$298.77</Text>
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Tax</Text>
<Text color="blueGray.400">$38.84</Text>
</HStack>
<HStack alignItems="center" justifyContent="space-between">
<Text fontWeight="medium">Total Amount</Text>
<Text color="green.500">$337.61</Text>
</HStack>
<VStack space={2} mt="2">
<Text bold>Promo Code</Text>
<HStack space={3}>
<Input flex="1" />
<Button variant="outline">Apply</Button>
</HStack>
</VStack>
<Button my="2" onPress={() => setIsOpen(!isOpen)}>
Place Order
</Button>
</VStack>
</Box>
<Slide in={isOpen} placement="top">
<Box p="2" _text={{
color: "orange.600"
}} bg="orange.200" {...safeAreaProps}>
Due to government restrictions around COVID- 19, you may experience
a delay in your delivery.
</Box>
</Slide>
</Box>
</Center>;
};
Props
Slide
Name
Type
Description
Default
in
boolean
Show the component; triggers the enter or exit states.
-
duration
number
Duration of animation in mili second.
500
placement
top ,bottom, left, right
The direction to slide drawer from.
bottom
Previous
PresenceTransition
Next
Stagger
Quick Nav
Import
Examples
Slide
Slide wrapped inside parent
Slide Composition
Props
Slide
MadeWithNativeBase
gluestack-ui
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.