Skip to main content

NeoPopTags

A compact inline label/tag with a semantic type, optional icon, and fully overridable color configuration.

Usage

// dark mode example
import { NeoPopTags } from 'neopop-rn';
import { Text } from 'react-native';

<NeoPopTags
type="success"
colorMode="dark"
colorConfig={{ background: '#06C270', color: '#ffffff' }}
>
<Text>Verified</Text>
</NeoPopTags>
// light mode example
import { NeoPopTags } from 'neopop-rn';
import { Text } from 'react-native';

<NeoPopTags
type="warning"
colorMode="light"
colorConfig={{ background: '#FFF3CD', color: '#856404', borderColor: '#FFEEBA' }}
>
<Text>Pending</Text>
</NeoPopTags>

Props

PropTypeDefaultDescription
childrenReact.ReactNodeRequired. Tag label content.
colorConfigNeoPopTagsColorConfigRequired. Color overrides for the tag (see colorConfig table).
type'warning' | 'error' | 'success' | 'info' | 'custom'Semantic type hint; the component may use this to select built-in defaults when colorConfig values are absent.
colorMode'dark' | 'light'Theme mode.
iconReact.ReactNodeOptional icon rendered to the left of the children.
noContainerbooleanWhen true, renders children without the background container (icon + text only).
textStyleStyleProp<TextStyle>Additional style applied to the text content.
styleStyleProp<ViewStyle>Additional style applied to the tag container.

colorConfig

KeyDescription
backgroundTag background fill color.
colorTag text / icon foreground color.
borderColorTag border color.

Notes

  • colorConfig is required (the type does not mark it optional); always pass at least an empty object {} to avoid type errors, though the component may fall back to type-based defaults.
  • noContainer removes the background View entirely, which is useful when embedding the tag inline inside other text.
  • The icon is rendered inside the container alongside children; size it appropriately for the tag height.