Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@gluestack-ui/actionsheet
Advanced tools
A universal headless actionsheet component for React Native, Next.js & React
@gluestack-ui/actionsheet
The Actionsheet component presents a set of options to the user, overlaid on top of the app's content, allowing them to take quick actions without leaving the current page or view.
To install the component, run the following command in your terminal. This will add the component to your project's dependencies and allow you to use it in your project.
npx install @gluestack-ui/actionsheet
Default styling of all these components can be found in the components/core/actionsheet file. For reference, you can view the source code of the styled Actionsheet components.
// import the styles
import {
Root,
Content,
Item,
ItemText,
DragIndicator,
IndicatorWrapper,
Backdrop,
} from '../components/core/actionsheet/styled-components';
// import the createActionsheet function
import { createActionsheet } from '@gluestack-ui/actionsheet';
// Understanding the API
const Actionsheet = createActionsheet({
Root,
Content,
Item,
ItemText,
DragIndicator,
IndicatorWrapper,
Backdrop,
});
// Using the actionsheet component
export default () => (
<Actionsheet isOpen={showActionsheet} onClose={handleClose}>
<ActionsheetBackdrop />
<ActionsheetContent>
<ActionsheetDragIndicatorWrapper>
<ActionsheetDragIndicator />
</ActionsheetDragIndicatorWrapper>
<ActionsheetItem onPress={handleClose}>
<ActionsheetItemText>Community</ActionsheetItemText>
</ActionsheetItem>
</ActionsheetContent>
</Actionsheet>
);
More guides on how to get started are available here.
FAQs
A universal headless actionsheet component for React Native, Next.js & React
The npm package @gluestack-ui/actionsheet receives a total of 12,668 weekly downloads. As such, @gluestack-ui/actionsheet popularity was classified as popular.
We found that @gluestack-ui/actionsheet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.