components
namespace componentsFunctions
HelpMessage(props: HelpMessageProps): ReactElement<HelpMessageProps, string | JSXElementConstructor<any>>
Discord's help message, or Unbound's own on Discord builds that no longer ship one, picked on first render.
Returns
The help message element.
isRenderable(value: unknown): value is ElementType<any, keyof IntrinsicElements>
Tells whether a value can be rendered as a React element type: a function or class
component, or a memo/forwardRef/lazy object.
Returns
Whether React can render it.
registerDesignFallback<K extends "Text" | "TextInput" | "Button" | "RowButton" | "TableRow" | "TableRadioRow" | "TableSwitchRow" | "TableCheckboxRow" | "ActionSheet" | "ActionSheetRow" | "AlertActionButton" | "AlertModal" | "Badge" | "Card" | "Checkbox" | "ContextMenu" | "FloatingActionButton" | "FormSwitch" | "GhostInput" | "Heading" | "IconButton" | "ImageButton" | "RowGroup" | "SearchBar" | "SearchField" | "SegmentedControl" | "SegmentedControlPages" | "Slider" | "SplitTextInput" | "Stack" | "TableRadioGroup" | "TableRowGroup" | "TableRowGroupTitle" | "TableRowIcon" | "TextArea" | "TextAreaField" | "TextField">(name: K, component: DesignModule[K]): void
Registers the component the design module returns when a Discord build lacks the named one or ships something React can't render.
Switch(props: SwitchProps): ReactElement<SwitchProps, string | JSXElementConstructor<any>>
Discord's switch, or its form switch, or React Native's, picked on first render.
Returns
The switch element.
Types
Props for HelpMessage; the defaults named here are those of Unbound's fallback.
A HelpMessage style: one of the HelpMessageTypes values.
The props of Discord's FormSwitch, which the switch fallback accepts.
The name of one component in DESIGN_COMPONENTS.
The Discord mobile design system module (keyed by createStyles / dismissAlerts / ContextMenu).
See DESIGN.md for the full catalogue.
Variables
AvatarPiles: any
Discord's stacked avatar components, AvatarPile and AvatarDuoPile; found on first access.
Avatars: any
Discord's avatar module, with Avatar and AvatarSizes; found on first access.
BackdropFilters: any
Discord's blur backdrop components, with BackgroundBlurFill; found on first access.
BottomSheets: any
Discord's bottom sheet components, with ActionSheet and BottomSheetTitleHeader; found on first access.
DefaultAvatars: any
Discord's default avatar images, DEFAULT_AVATARS and DEFAULT_AVATARS_SMALL; found on first access.
Discord's design module, with Unbound's fallbacks standing in for components a build lacks.
FlashList: any
Discord's copy of Shopify's FlashList module; found on first access.
Forms: any
Discord's legacy form components, such as FormRow and FormSection; {} on builds without them.
GorhomSheet: any
The @gorhom/bottom-sheet Discord bundles, whose BottomSheetScrollView scrolls inside a scrollable sheet; found on first access.
HelpMessageTypes: any
The messageType values for HelpMessage, from Discord or else Unbound's fallback; {} when neither loads.
Media: any
Discord's media viewer module, with openMediaModal; found on first access.
Portal: any
Discord's portal components, Portal and PortalHost, for rendering outside the tree; found on first access.
SafeArea: any
Discord's safe area components, with SafeAreaPaddingView; found on first access.
SafeAreaContext: any
react-native-safe-area-context, with useSafeAreaInsets; found on first access.
TableRowDividers: any
Discord's TableRowDivider, the hairline TableRowGroup draws between rows; found on first access.
Video: any
Discord's video player module, with VideoComponent and createVideoControls; found on first access.
DESIGN_COMPONENTS: readonly ["SearchBar", "Badge", "Text", "Heading", "TableRow", "TableSwitchRow", "FormSwitch", "TableCheckboxRow", "TableRadioRow", "TableRadioGroup", "TableRowGroup", "TableRowGroupTitle", "TableRowIcon", "RowButton", "RowGroup", "Button", "IconButton", "ImageButton", "FloatingActionButton", "TextInput", "TextField", "TextArea", "TextAreaField", "SearchField", "GhostInput", "SplitTextInput", "Slider", "Checkbox", "SegmentedControl", "SegmentedControlPages", "Stack", "Card", "AlertModal", "AlertActionButton", "ActionSheet", "ActionSheetRow", "ContextMenu"]
The components of Discord's design module, each of which Unbound can stand in for when Discord drops it.