components/Keycap
import { … } from 'zidane-ui'ui/src/components/Keycap.tsx
const agent = createAgent({ ...basic, provider })
await agent.run({ prompt: 'build a REST API' })cat packages/server/src/handlers/very-long-folder-name/another-nested-directory/session-title-generator.ts | head -n 200 # a long line scrolls inside the frame
$ bun test 41 passed
Components#
KeycapComponent#
One key, for places that show a single glyph or word (esc, ↵).
function Keycap(props: KeycapProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | KeycapProps | Component props. |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| children | ReactNode | The key's glyph or word. |
| className? | string | Extra classes on the keycap. |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
KeyComboComponent#
One chord as keycaps (cmd+k → ⌘ K), macOS glyphs. size="sm" for
dense rows (footer hints), default for lists. Several alternatives
(ctrl+w | cmd+w) are the caller's business: render one KeyCombo each.
function KeyCombo(props: KeyComboProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | KeyComboProps | Component props. |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the wrapping element. | |
| physical? | boolean | The chord names physical keys (an app key binding): a punctuation key shows what the user's
keyboard layout prints on it ( | |
| size? | 'sm' | 'md' | 'md' | Cap size. Use |
| spec | string | The chord, keys joined by | |
| spoken? | boolean | Off where the control already announces the chord ( | |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
Interfaces#
KeycapPropsInterface#
Props for Keycap.
interface KeycapPropsProperties
| Name | Type | Description |
|---|---|---|
| children | ReactNode | The key's glyph or word. |
| className? | string | Extra classes on the keycap. |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
KeyComboPropsInterface#
Props for KeyCombo.
interface KeyComboPropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| className? | string | Extra classes on the wrapping element. | |
| physical? | boolean | The chord names physical keys (an app key binding): a punctuation key shows what the user's
keyboard layout prints on it ( | |
| size? | 'sm' | 'md' | 'md' | Cap size. Use |
| spec | string | The chord, keys joined by | |
| spoken? | boolean | Off where the control already announces the chord ( | |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |