Boost provides the following components for use within your programs.
Header component is simply that, a header! It renders an inverted background, with bold and
uppercased text, and appropriate margins. It's what the help and failure menus
use to separate and denote sections.
string) - Text to display for the label. (Required)
number) - The bottom margin. Defaults to
number) - The top margin. Defaults to
StyleType) - Customize the background color using Style. Defaults to normal text.
Help component can be used to render elegant command usage and help menus. It's a very complex
component that supports everything from command metadata to variadic params, all through the
following props (all optional).
Record<string, Category>) - Mapping of categories to use for command and option grouping.
CommandConfig) - Configuration metadata about the current command.
Record<string, CommandConfig>) - Mapping of commands, typically sub-commands.
string) - A header to display at the top of the output.
Record<string, OptionConfig>) - Mapping of options.
ParamConfig) - List of params.
Failure component can be used to render a beautiful failure menu, for an error and its stack
error prop must be provided with an
Error) - The primary error to display in red. (Required)
boolean) - Hide the primary error stack trace. Defaults to
Error) - Optional errors as warnings to display in yellow.
Style component is special in that it renders and applies colors based on the
chosen theme. It accomplishes this through the
type prop, which accepts one
of the theme palette names.
Furthermore, it also supports text styling similar to Ink's
Text component. This uses
chalk under the hood.
It's highly encouraged to use this component for all color based styling, so that consumers can always use their chosen theme!
boolean) - Invert the colors to style the background instead of foreground. Defaults to
StyleType) - Theme palette name to style with. Accepts "default", "failure", "info", "inverted", "muted", "notice", "success", and "warning". Defaults to none.