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 — ActionSheet | NativeBase | Universal Components for React and React Native

ActionSheet | 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.
ActionSheet
An Actionsheet is a dialog that displays a set of options. It appears on top of the app's content.
Show Code
Playground
function Example() {
const {
isOpen,
onOpen,
onClose
} = useDisclose();
return <>
<Button onPress={onOpen} shadow={2}>
Actionsheet
</Button>
<Actionsheet isOpen={isOpen} onClose={onClose}>
<Actionsheet.Content>
<Box w="100%" h={60} px={4} justifyContent="center">
<Text fontSize="16" color="gray.500" _dark={{
color: "gray.300"
}}>
Albums
</Text>
</Box>
<Actionsheet.Item>Delete</Actionsheet.Item>
<Actionsheet.Item>Share</Actionsheet.Item>
<Actionsheet.Item>Play</Actionsheet.Item>
<Actionsheet.Item>Favourite</Actionsheet.Item>
<Actionsheet.Item>Cancel</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</>;
}
Import
Actionsheet: Provides the context and state for all components.
Actionsheet.Content: Component to wrap the list of Actionsheet.Item components.
Actionsheet.Item: A button to wrap the options of the Actionsheet.
Copy
import { Actionsheet } from "native-base";
Examples
Usage
Playground
function Example() {
const {
isOpen,
onOpen,
onClose
} = useDisclose();
return <Center>
<Button onPress={onOpen}>Actionsheet</Button>
<Actionsheet isOpen={isOpen} onClose={onClose}>
<Actionsheet.Content>
<Box w="100%" h={60} px={4} justifyContent="center">
<Text fontSize="16" color="gray.500" _dark={{
color: "gray.300"
}}>
Albums
</Text>
</Box>
<Actionsheet.Item>Delete</Actionsheet.Item>
<Actionsheet.Item isDisabled>Share</Actionsheet.Item>
<Actionsheet.Item>Play</Actionsheet.Item>
<Actionsheet.Item>Favourite</Actionsheet.Item>
<Actionsheet.Item>Cancel</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</Center>;
}
Composition
Playground
function Example() {
const {
isOpen,
onOpen,
onClose
} = useDisclose();
return <Center>
<Button onPress={onOpen}>Actionsheet</Button>
<Actionsheet isOpen={isOpen} onClose={onClose} hideDragIndicator>
<Actionsheet.Content borderTopRadius="0">
<Box w="100%" h={60} px={4} justifyContent="center">
<Text fontSize="16" color="gray.500" _dark={{
color: "gray.300"
}}>
Albums
</Text>
</Box>
<Actionsheet.Item>Delete</Actionsheet.Item>
<Actionsheet.Item>Share</Actionsheet.Item>
<Actionsheet.Item>Play</Actionsheet.Item>
<Actionsheet.Item>Favourite</Actionsheet.Item>
<Actionsheet.Item>Cancel</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</Center>;
}
DisableOverlay
Playground
function Example() {
const {
isOpen,
onOpen,
onClose
} = useDisclose();
return <Center>
<Button onPress={onOpen}>Actionsheet</Button>
<Actionsheet isOpen={isOpen} onClose={onClose} disableOverlay>
<Actionsheet.Content>
<Box w="100%" h={60} px={4} justifyContent="center">
<Text fontSize="16" color="gray.500" _dark={{
color: "gray.300"
}}>
Albums
</Text>
</Box>
<Actionsheet.Item>Delete</Actionsheet.Item>
<Actionsheet.Item>Share</Actionsheet.Item>
<Actionsheet.Item>Play</Actionsheet.Item>
<Actionsheet.Item>Favourite</Actionsheet.Item>
<Actionsheet.Item>Cancel</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</Center>;
}
Icons
Playground
function Example() {
const {
isOpen,
onOpen,
onClose
} = useDisclose();
return <Center>
<Button onPress={onOpen}>Actionsheet</Button>
<Actionsheet isOpen={isOpen} onClose={onClose} size="full">
<Actionsheet.Content>
<Box w="100%" h={60} px={4} justifyContent="center">
<Text fontSize="16" color="gray.500" _dark={{
color: "gray.300"
}}>
Albums
</Text>
</Box>
<Actionsheet.Item startIcon={<Icon as={MaterialIcons} size="6" name="delete" />}>
Delete
</Actionsheet.Item>
<Actionsheet.Item startIcon={<Icon as={MaterialIcons} name="share" size="6" />}>
Share
</Actionsheet.Item>
<Actionsheet.Item startIcon={<Icon as={Ionicons} name="play-circle" size="6" />}>
Play
</Actionsheet.Item>
<Actionsheet.Item startIcon={<Icon as={MaterialIcons} size="6" name="favorite" />}>
Favourite
</Actionsheet.Item>
<Actionsheet.Item startIcon={<Icon viewBox="0 0 24 24" size="6" fill="none">
<Path d="M12.0007 10.5862L16.9507 5.63623L18.3647 7.05023L13.4147 12.0002L18.3647 16.9502L16.9507 18.3642L12.0007 13.4142L7.05072 18.3642L5.63672 16.9502L10.5867 12.0002L5.63672 7.05023L7.05072 5.63623L12.0007 10.5862Z" />
</Icon>}>
Cancel
</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</Center>;
}
Props
Actionsheet
Actionsheet implements
View
,
SafeAreaProps
,
PlatformProps
,
FlexProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
isOpen
If true, the ActionSheet will open. Useful for controllable state behavior.
Type: boolean
onClose
Callback invoked when the modal is closed.
Type: () => any
disableOverlay
If true, disables the overlay.
Type: boolean
Default: false
hideDragIndicator
If true, hides the drag indicator.
Type: boolean
Default: false
_backdrop
Props applied on Overlay.
Type: any
useRNModal
Type: boolean
Actionsheet.Content
ActionsheetContent implements
View
,
SafeAreaProps
,
PlatformProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
,
FlexProps
_dragIndicatorWrapperOffSet
Props applied on area above actionsheet content.
Type: InterfaceBoxProps<IActionsheetContentProps>
_dragIndicatorWrapper
Props applied on area around drag indicator.
Type: InterfaceBoxProps<IActionsheetContentProps>
_dragIndicator
Props applied on drag indicator.
Type: InterfaceBoxProps<IActionsheetContentProps>
Actionsheet.Item
Actionsheet.Item implements
Button
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the actionsheet
here
.
Info: We can easily extend the actionsheet component theme using extendTheme function as described in the documentation
here
.
Accessibility
ActionSheet has aria-modal set to true.
ActionSheet has role set to dialog.
When the ActionSheet opens, focus is trapped within it.
Pressing Esc closes the ActionSheet.
When the ActionSheet opens, focus is automatically set to the first enabled element.
Clicking on the overlay closes the ActionSheet.
Scrolling is blocked on the elements behind the ActionSheet.
Previous
Tooltip
Next
Avatar
Quick Nav
Import
Examples
Usage
Composition
DisableOverlay
Icons
Props
Actionsheet
Actionsheet.Content
Actionsheet.Item
Styling
Accessibility
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.