Socket
Socket
Sign inDemoInstall

@gluestack-ui/actionsheet

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gluestack-ui/actionsheet

A universal headless actionsheet component for React Native, Next.js & React


Version published
Weekly downloads
15K
decreased by-1%
Maintainers
0
Weekly downloads
 
Created
Source

@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.

Installation

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

Usage

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.

Keywords

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc