Skip to main content

NeoPopDropdown

A NeoPop-styled dropdown trigger row that shows a label, the current value or placeholder, and an animated chevron; it does not manage an option list internally.

Usage​

// dark mode example
import { NeoPopDropdown } from 'neopop-rn';
import { useState } from 'react';

function Example() {
const [open, setOpen] = useState(false);
const [value, setValue] = useState<string | undefined>();

return (
<>
<NeoPopDropdown
label="State"
value={value}
placeholder="Select a state"
isOpen={open}
colorMode="dark"
onPress={() => setOpen((v) => !v)}
/>
{/* render your option list here when open */}
</>
);
}
// light mode example
import { NeoPopDropdown } from 'neopop-rn';
import { useState } from 'react';

function Example() {
const [open, setOpen] = useState(false);
const [value, setValue] = useState<string | undefined>();

return (
<NeoPopDropdown
label="City"
value={value}
placeholder="Choose your city"
isOpen={open}
colorMode="light"
colorConfig={{
borderColor: '#cccccc',
backgroundColor: '#ffffff',
labelColor: '#555555',
valueColor: '#0d0d0d',
placeholderColor: '#999999',
iconColor: '#0d0d0d',
}}
onPress={() => setOpen((v) => !v)}
/>
);
}

Props​

PropTypeDefaultDescription
labelstring—Required. The field label displayed above or beside the value.
onPress() => void—Required. Called when the dropdown row is tapped.
valuestring—The currently selected option string.
placeholderstring—Text shown when value is not set.
isOpenboolean—Controls the direction of the chevron icon (up when open, down when closed).
colorConfigNeoPopDropdownColorConfig—Per-token color overrides (see colorConfig table).
colorMode'dark' | 'light'—Theme mode for default colors.
disabledboolean—Disables interaction and dims the component.
styleStyleProp<ViewStyle>—Additional style applied to the outer container.
labelStyleStyleProp<TextStyle>—Additional style applied to the label text.
valueStyleStyleProp<TextStyle>—Additional style applied to the value / placeholder text.

colorConfig​

KeyDescription
borderColorBorder color of the dropdown row container.
backgroundColorBackground color of the dropdown row.
labelColorColor of the label text.
valueColorColor of the selected value text.
placeholderColorColor of the placeholder text (when no value is selected).
iconColorColor of the chevron icon.

Notes​

  • NeoPopDropdown is a presentational trigger only; it does not render an option list. Connect it to a NeoPopBottomSheet, modal, or any custom list component to handle option display and selection.
  • The chevron animates between pointing up (isOpen: true) and pointing down (isOpen: false).
  • Pass the selected option's display string to value to update the displayed text after selection.