Skip to main content

Chip

Data Display

Chip

Assist and filter chips with optional icons for inline metadata.

Usage

Show attributes, selections, or quick filters that can be toggled.

Highlights

  • Icon and avatar slots
  • Supports onPress/onClose gestures

When to use it

  • Inline filters for tables or feeds.
  • Represent tokens like skills, tags, or statuses.

Examples

Default

Preview (Web)
import { Chip } from 'react-native-molecules/components/Chip';
import { Icon } from 'react-native-molecules/components/Icon';

export default function Example() {
  return (
      <Chip
          label="Default Chip"
          variant="outlined"
          size="md"
          left={<Icon name="star-outline" size={18} />}
      />
  );
}

Suggestion Chip

Preview (Web)
import { Chip } from 'react-native-molecules/components/Chip';

export default function Example() {
  return <Chip.Suggestion label="Suggestion Chip" variant="outlined" size="md" />;
}

Assist Chip

Preview (Web)
import { Chip } from 'react-native-molecules/components/Chip';
import { Icon } from 'react-native-molecules/components/Icon';

export default function Example() {
  return (
      <Chip.Assist
          label="Assist Chip"
          variant="outlined"
          size="md"
          left={<Icon name="calendar" size={18} />}
      />
  );
}

Input Chip

Preview (Web)
import { useState } from 'react';
import { Chip } from 'react-native-molecules/components/Chip';

export default function Example() {
  const [selected, setSelected] = useState(false);

  return (
      <Chip.Input
          selected={selected}
          onPress={() => setSelected((prev) => !prev)}
          label="Input Chip"
      />
  );
}

Filter Chip

Preview (Web)
import { useState } from 'react';
import { Chip } from 'react-native-molecules/components/Chip';

export default function Example() {
  const [selected, setSelected] = useState(false);

  return (
      <Chip.Filter
          selected={selected}
          onPress={() => setSelected((prev) => !prev)}
          label="Filter Chip"
      />
  );
}
PropTypeDefaultDescription
testIDstring | undefined
accessibilityLabelstring | undefinedAccessibility label for the chip. This is read by the screen reader when the user taps the chip.
onPress(((event: GestureResponderEvent) => void) & ((e: GestureResponderEvent) => void) & ((e: GestureResponderEvent) => void)) | undefinedFunction to execute on press.
disabledboolean | undefinedWhether the chip is disabled. A disabled chip is greyed out and `onPress` is not called on touch.
labelRequiredstringlabel of the chip Will be truncated if it's longer than 20 characters
labelCharacterLimitnumber | undefinedcharacter limit of the label
variant"outlined" | "elevated" | undefinedVariant of the chip. - `elevated` - elevated chip with shadow and without outline. - `outlined` - chip with an outline. (outline will always have elevation 0 even if it's specified)
size"sm" | "md" | undefined
onClose(() => void) | undefinedcallback event when the closeIcon is pressed
elevationMD3Elevation | undefinedelevation level of the elevated chip
selectedboolean | undefinedselected state
closeIconPropsPartial<IconButtonProps> | undefinedprops for the close icon default is { name: 'close', onPress: onClose, disabled, accessibilityLabel: 'Close' }
activityIndicatorPropsPartial<ActivityIndicatorProps> | undefinedprops for the ActivityIndicator default is { size: 18 }
selectedColorstring | undefinedWhether to style the chip color as selected.
selectionBackgroundColorstring | undefinedWhether to display overlay on selected chip
loadingboolean | undefinedWhether to show the ActivityIndicator or not
leftElementContainerStyleViewStyle | undefinedleft element container style
rightElementContainerStyleViewStyle | undefinedright element container style
labelStylePartial<TextStyle> | undefinedlabel style
stateLayerPropsViewProps | undefinedPass down testID from chip props to touchable for Detox tests.
containerPropsOmit<ViewProps, "style"> | undefined
leftElementIconPropsIconProps | undefined
rightElementIconPropsIconProps | undefined
backgroundColorstring | undefined
invertLabelColorboolean | undefined
Defined in react-native-molecules/components/Chip