TriggerRenderProps — @gj-kit/expo-ui
A public interface from @gj-kit/expo-ui. The signature below is taken directly from the 0.8.1 release declaration.
Verified import example
Section titled “Verified import example”import { TriggerRenderProps } from '@gj-kit/expo-ui';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * The injected contract of the renderTrigger slot. * * The kit owns trigger behavior and accessibility; the consumer owns only the * visuals. Both a type-level union and runtime validation enforce that split. *//** * Props the kit injects into a `renderTrigger` element. Spread every one of * them onto a single Pressable — or an equivalent host that actually forwards * React Native press handling (a plain View silently drops `onPress` and * ships an announced-but-inoperable button, so it is not a valid host). The * kit owns press behavior, disabled/expanded accessibility state, ids, and * the measurement hooks that anchoring needs, while the consumer owns only * the visuals. The object also carries platform wiring beyond these declared * keys (web `aria-haspopup`/`aria-controls`/key handlers, Select value text), * so forwarding a hand-picked subset instead of spreading breaks the * contract. */interface TriggerRenderProps { /** * Must reach the returned host element. Anchored positioning measures the * trigger through it and dismissal restores focus to it; the component * throws when it opens without the ref attached. */ readonly ref: (node: unknown) => void; readonly onPress: (event: GestureResponderEvent) => void; readonly disabled: boolean; /** 'button' for Menu (and native Select); 'combobox' for the web Select. */ readonly accessibilityRole: 'button' | 'combobox'; readonly accessibilityLabel: string; readonly accessibilityState: { readonly disabled: boolean; readonly expanded: boolean; readonly busy: boolean; }; /** * Dual-written with accessibilityState.expanded: React Native maps aria-* * onto accessibilityState natively, while React Native Web needs the aria * attribute directly because it does not map accessibilityState to DOM aria. */ readonly 'aria-expanded': boolean; /** Select only — the helper or error text of the field. */ readonly accessibilityHint?: string | undefined; /** Select only — the displayed value or placeholder. */ readonly accessibilityValue?: { readonly text: string; } | undefined; /** The component's triggerTestID (web Select falls back to `${testID}-trigger`). */ readonly testID?: string | undefined; /** Re-measures an open native anchored panel when the trigger's layout moves. */ readonly onLayout?: (() => void) | undefined; /** Web Select only — the DOM id the label and popup relationships expect. */ readonly nativeID?: string | undefined;}This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/expo-ui - Version:
0.8.1 - Public entry:
. - Source: GitHub