Socket
Socket
Sign inDemoInstall

@gluestack-ui/alert

Package Overview
Dependencies
Maintainers
16
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gluestack-ui/alert

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


Version published
Maintainers
16
Created
Source

@gluestack-ui/alert

Installation

To use @gluestack-ui/alert, all you need to do is install the @gluestack-ui/alert package:

$ yarn add @gluestack-ui/alert

# or

$ npm i @gluestack-ui/alert

Usage

Alerts are used to communicate the status of a system, feature, or page. They indicate a specific state that may require attention from the user. Here's an example how to use this package to create one:

import { createAlert } from '@gluestack-ui/alert';
import { Root, Text, Icon } from './styled-components';
export const Alert = createAlert({
  Root,
  Text,
  Icon,
});

Customizing the Alert:

Default styling of all these components can be found in the components/core/alert file. For reference, you can view the source code of the styled Alert components.

// import the styles
import { Root, Text, Icon } from '../components/core/alert/styled-components';

// Understanding the API
const Alert: any = Root;
AlertIcon = Icon;
AlertText = Text;

// Using the alert component
export default () => (
  <Alert>
    <AlertIcon />
    <AlertText />
  </Alert>
);

More guides on how to get started are available here

Keywords

FAQs

Package last updated on 08 Jul 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