
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@gluestack-ui/select
Advanced tools
A universal headless select component for React Native, Next.js & React
@gluestack-ui/select
Select offers a dynamic and user-friendly way to present a list of options in a closed view, with the ability to expand and select items from a dropdown list.
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/select
Default styling of all these components can be found in the components/select file. For reference, you can view the source code of the styled Select components.
// import animation configured styled function
import { styled } from '../styled';
// import the styles
import {
Root as StyledSelectRoot,
Trigger as StyledSelectTrigger,
Input as StyledSelectInput,
Icon as StyledSelectIcon,
} from '../components/core/select/styled-components';
import {
Root,
Content,
Item,
ItemText,
DragIndicator,
IndicatorWrapper,
Backdrop,
Icon,
FlatList,
ScrollView,
SectionHeaderText,
SectionList,
VirtualizedList,
} from '../components/core/actionsheet/styled-components';
// import the createSelect and createActionsheet function
import { createSelect } from '@gluestack-ui/select';
import { createActionsheet } from '@gluestack-ui/actionsheet';
// Understanding the API
const Actionsheet = createActionsheet({
Root,
Backdrop,
Content,
DragIndicator,
IndicatorWrapper,
Item,
ItemText,
Icon,
ScrollView,
VirtualizedList,
FlatList,
SectionList,
SectionHeaderText,
AnimatePresence: styled.Component,
});
const Select = createSelect(
{
Root: StyledSelectRoot,
Trigger: StyledSelectTrigger,
Input: StyledSelectInput,
Icon: StyledSelectIcon,
},
{
Portal: Actionsheet,
Backdrop: Actionsheet.Backdrop,
Content: Actionsheet.Content,
DragIndicator: Actionsheet.DragIndicator,
DragIndicatorWrapper: Actionsheet.DragIndicatorWrapper,
Item: Actionsheet.Item,
ItemText: Actionsheet.ItemText,
ScrollView: Actionsheet.ScrollView,
VirtualizedList: Actionsheet.VirtualizedList,
FlatList: Actionsheet.FlatList,
SectionList: Actionsheet.SectionList,
SectionHeaderText: Actionsheet.SectionHeaderText,
}
);
// Using the select component
export default () => (
<Select isDisabled={isDisabled} isInvalid={isInvalid}>
<SelectTrigger>
<SelectInput placeholder="Select option" />
<SelectIcon mr="$3">
<Icon as={ChevronDownIcon} />
</SelectIcon>
</SelectTrigger>
<SelectPortal>
<SelectBackdrop />
<SelectContent>
<SelectDragIndicatorWrapper>
<SelectDragIndicator />
</SelectDragIndicatorWrapper>
<SelectItem label="UX Research" value="UX Research" />
<SelectItem label="Web Development" value="Web Development" />
</SelectContent>
</SelectPortal>
</Select>
);
More guides on how to get started are available here.
FAQs
A universal headless select component for React Native, Next.js & React
The npm package @gluestack-ui/select receives a total of 33,124 weekly downloads. As such, @gluestack-ui/select popularity was classified as popular.
We found that @gluestack-ui/select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.