skills/m3-web-ink/SKILL.md
Implement Material Design 3 in terminal CLIs using Ink (React for CLIs) with @inkjs/ui components. Covers M3 token mapping to terminal colors, ThemeProvider setup, component mapping, and ANSI fallbacks. Use this when building M3-styled command-line interfaces.
npx skillsauth add shelbeely/shelbeely-agent-skills m3-web-inkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ink is a React renderer for building interactive command-line interfaces. Combined with @inkjs/ui, it provides themeable CLI components. M3 design tokens can be mapped to terminal colors for consistent, Material-styled CLI experiences.
Keywords: Material Design 3, M3, Ink, CLI, terminal, command-line, @inkjs/ui, React CLI, terminal UI
npm install ink react @inkjs/ui
Map M3 tokens to terminal colors:
// m3-theme.js
export const m3Theme = {
colors: {
primary: '#6750A4',
onPrimary: '#FFFFFF',
secondary: '#625B71',
tertiary: '#7D5260',
error: '#B3261E',
surface: '#FEF7FF',
onSurface: '#1D1B20',
outline: '#79747E',
// Terminal-friendly named colors (for broader compatibility)
primaryTerminal: 'magenta',
secondaryTerminal: 'gray',
errorTerminal: 'red',
successTerminal: 'green',
},
};
// For dark terminal backgrounds
export const m3ThemeDark = {
colors: {
primary: '#D0BCFF',
onPrimary: '#381E72',
secondary: '#CCC2DC',
error: '#F2B8B5',
surface: '#141218',
onSurface: '#E6E0E9',
primaryTerminal: 'magentaBright',
errorTerminal: 'redBright',
},
};
import React from 'react';
import {render, Box, Text} from 'ink';
import {TextInput, Select, Spinner, Badge} from '@inkjs/ui';
import {m3Theme} from './m3-theme.js';
function App() {
return (
<Box flexDirection="column" padding={1} gap={1}>
{/* M3 Primary colored heading */}
<Text color={m3Theme.colors.primary} bold>
✦ Material Design 3 CLI
</Text>
{/* M3 Surface container */}
<Box
borderStyle="round"
borderColor={m3Theme.colors.outline}
paddingX={2}
paddingY={1}
flexDirection="column"
gap={1}
>
<Text color={m3Theme.colors.onSurface}>
Welcome to the M3-styled terminal
</Text>
<TextInput
placeholder="Enter your name..."
onSubmit={name => {}}
/>
<Select
options={[
{label: 'Option 1', value: '1'},
{label: 'Option 2', value: '2'},
]}
onChange={value => {}}
/>
</Box>
{/* M3 Status indicators */}
<Box gap={1}>
<Badge color="green">Success</Badge>
<Badge color={m3Theme.colors.errorTerminal}>Error</Badge>
</Box>
<Spinner label="Loading..." />
</Box>
);
}
render(<App />);
import {Box, Text} from 'ink';
<Box paddingX={2} paddingY={0}>
<Text backgroundColor="magenta" color="white" bold> Action </Text>
</Box>
import {Select} from '@inkjs/ui';
<Select
options={[
{label: '🏠 Home', value: 'home'},
{label: '🔍 Search', value: 'search'},
{label: '⚙️ Settings', value: 'settings'},
]}
onChange={value => {}}
/>
import {ThemeProvider, extendTheme} from '@inkjs/ui';
const m3InkTheme = extendTheme({
components: {
TextInput: {
styles: {
focusColor: 'magenta', // M3 primary
},
},
Select: {
styles: {
highlightColor: 'magenta',
},
},
Spinner: {
styles: {
color: 'magenta',
},
},
},
});
function App() {
return (
<ThemeProvider theme={m3InkTheme}>
{/* All child components use M3-inspired theme */}
</ThemeProvider>
);
}
magenta (closest to M3 purple primary)graycyanredgreen (custom role for CLI)chalk.level or supports-color package| M3 Component | Ink/ink-ui Equivalent | Notes |
|--------------|----------------------|-------|
| Filled Button | <Box> + <Text> styled | Background color + text |
| Text Field | <TextInput> | From @inkjs/ui |
| Select / Menu | <Select> | From @inkjs/ui |
| Multi-select | <MultiSelect> | From @inkjs/ui |
| Progress Indicator | <Spinner>, <ProgressBar> | From @inkjs/ui |
| Badge / Chip | <Badge> | From @inkjs/ui |
| Confirm Dialog | <ConfirmInput> | From @inkjs/ui |
| Card | <Box borderStyle="round"> | Bordered container |
| Divider | <Text>{'─'.repeat(n)}</Text> | Horizontal rule |
| List | <UnorderedList>, <OrderedList> | From @inkjs/ui |
| Alert / Snackbar | <Alert> | From @inkjs/ui |
@inkjs/ui ThemeProvider configured with M3-inspired colorstools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
development
Generate Material Design 3 color themes programmatically from a source color using @material/material-color-utilities, the same engine that powers the Material Theme Builder. Use this when the user asks to generate an M3 color palette, create a custom theme from a brand color, or export M3 tokens to CSS, JSON, or framework configs.
testing
Applies Material Design 3 Expressive typography principles including variable fonts, type scales, and hierarchy. Use this when working on text styling, type hierarchy, readable interfaces, or when the user asks to apply Material Design 3 typography guidelines.
testing
Applies Material Design 3 Expressive shape and containment principles including rounded corners, morphing shapes, and container design. Use this when working on component shapes, borders, containment, or when the user asks to apply Material Design 3 shape guidelines.