Theming
Customize colors and borders across all components.
Theme system
Every InkUI component accepts an optional theme prop of type InkUITheme. By default, all components use darkTheme.
If you used npx @inkui-cli/inkui add, import from the shared _core.ts that was copied into your project:
If you installed via npm (npm install @inkui-cli/spinner), import from the package:
Theme shape
Built-in themes
InkUI ships two themes out of the box:
Custom theme
Create your own theme by spreading the defaults and overriding what you need:
Color values are passed directly to Ink's <Text color=""> — named colors (cyan, green), hex (#F472B6), or rgb(r,g,b). No chalk, no ANSI escape codes.
Global theme provider
For consistency across your whole CLI app, create a theme context:
Visual theme builder
Run the interactive theme builder in your terminal to pick colors and export a ready-to-use theme file:
Border styles
The border token controls box-drawing characters across Table, Dialog, Panel, and other bordered components:
| Value | Characters |
|---|---|
single | ┌─┐│└┘ |
double | ╔═╗║╚╝ |
rounded | ╭─╮│╰╯ |
bold | ┏━┓┃┗┛ |
ascii | +-+|+-+ |