N

components

namespace components

Functions

F

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.

F

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.

F

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.

F

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

Discord's stacked avatar components, AvatarPile and AvatarDuoPile; found on first access.

V

Avatars: any

Discord's avatar module, with Avatar and AvatarSizes; found on first access.

Discord's blur backdrop components, with BackgroundBlurFill; found on first access.

Discord's bottom sheet components, with ActionSheet and BottomSheetTitleHeader; found on first access.

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.

V

FlashList: any

Discord's copy of Shopify's FlashList module; found on first access.

V

Forms: any

Discord's legacy form components, such as FormRow and FormSection; {} on builds without them.

The @gorhom/bottom-sheet Discord bundles, whose BottomSheetScrollView scrolls inside a scrollable sheet; found on first access.

The messageType values for HelpMessage, from Discord or else Unbound's fallback; {} when neither loads.

V

Media: any

Discord's media viewer module, with openMediaModal; found on first access.

V

Portal: any

Discord's portal components, Portal and PortalHost, for rendering outside the tree; found on first access.

V

SafeArea: any

Discord's safe area components, with SafeAreaPaddingView; found on first access.

react-native-safe-area-context, with useSafeAreaInsets; found on first access.

Discord's TableRowDivider, the hairline TableRowGroup draws between rows; found on first access.

V

Video: any

Discord's video player module, with VideoComponent and createVideoControls; found on first access.

V

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.