
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
bpk-component-chip
Advanced tools
Backpack chip component.
npm install bpk-component-chip --save-dev
import React from 'react';
import BpkSelectableChip, { BpkDismissibleChip, CHIP_TYPES } from 'bpk-component-chip';
import BeachIconSm from 'bpk-component-icon/sm/beach';
export default () => (
<div style={{ display: 'flex' }}> // IMPORTANT: Flex styles make sure chips align with each other
// Standard selectable chip.
<BpkSelectableChip
accessibilityLabel="Press to toggle chip"
selected={false}
onClick={() => { /* Use state to set 'selected={true}' */ }}
>
Toggle me
</BpkSelectableChip>
// Selectable chip with an icon.
<BpkSelectableChip
accessibilityLabel="Press to toggle chip"
selected={false}
onClick={() => { /* Use state to set 'selected={true}' */ }}
leadingAccessoryView={<BeachIconSm />}
>
Toggle me
</BpkSelectableChip>
// Standard dismissible chip.
<BpkDismissibleChip
accessibilityLabel="Press to dismiss chip"
onClick={() => { /* Use state to handle removing this chip. */ }}
>
Dismiss me
</BpkDismissibleChip>
// Dismissible chip with an icon.
<BpkDismissibleChip
accessibilityLabel="Press to dismiss chip"
onClick={() => { /* Use state to handle removing this chip. */ }}
leadingAccessoryView={<BeachIconSm />}
>
Dismiss me
</BpkDismissibleChip>
</div>
);
Property | PropType | Required | Default Value |
---|---|---|---|
accessibilityLabel | string | true | - |
children | node | true | - |
onClick | func | true | - |
className | string | false | null |
disabled | bool | false | false |
leadingAccessoryView | node | false | null |
selected | bool | false | false |
trailingAccessoryView | node | false | null |
type | oneOf(CHIP_TYPES.light , CHIP_TYPES.primary , CHIP_TYPES.success ) |
Dismissible chips are selectable chips that have been preconfigured to have a 'close' icon trailing accessory view and cannot be selected, so they have the same props as BpkSelectableChip
, minus trailingAccessoryView
and selected
.
Property | PropType | Required | Default Value |
---|---|---|---|
accessibilityLabel | string | true | - |
children | node | true | - |
onClick | func | true | - |
className | string | false | null |
disabled | bool | false | false |
leadingAccessoryView | node | false | null |
type | oneOf(CHIP_TYPES.light , CHIP_TYPES.primary , CHIP_TYPES.success ) |
chipPrimarySelectedBackgroundColor
chipPrimarySelectedHoverBackgroundColor
chipPrimarySelectedActiveBackgroundColor
chipPrimarySelectedTextColor
chipLightSelectedBackgroundColor
chipLightSelectedHoverBackgroundColor
chipLightSelectedActiveBackgroundColor
chipLightSelectedTextColor
chipSuccessSelectedBackgroundColor
chipSuccessSelectedHoverBackgroundColor
chipSuccessSelectedActiveBackgroundColor
chipSuccessSelectedTextColor
FAQs
Backpack chip component.
We found that bpk-component-chip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.