charcell 0.1.0
mode

Frame

a titled box around a pane. the active frame is the only one drawn in white.

usage

example

code

import { Frame } from 'charcell/react';

export function FrameExample() {
  return (
    <Frame title="quohog">the customer with the knife is always right.</Frame>
  );
}

as text

at rest
┌─ quohog ─────────────────────────────┐
│ the customer with the knife is       │
│ always right.                        │
└──────────────────────────────────────┘

props

titlestring
The text in the ring's top row, set on the stroke.
activeboolean
The focused pane: the stroke climbs to the foreground.
border'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of every side of the ring: single, rounded, heavy, double or none.
borderX'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's start and end sides, over border.
borderY'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's top and bottom sides, over border.
borderTop'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's top side, over borderY and border.
borderEnd'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's end side, over borderX and border.
borderBottom'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's bottom side, over borderY and border.
borderStart'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the ring's start side, over borderX and border.
flushboolean
Drops the body's side padding, for edge-to-edge content.
fillboolean
Takes the container's box: grows in a flex or grid layout, and takes the full height of a block that has one.
quietboolean
A frame that groups rather than bounds: the stroke at faint, the title at mid.
as'section' | 'div' | 'li' | 'article' | 'aside'= 'section'
The root element: a frame that is not a landmark region, such as a node in an editor tree, is a div or an li.

it also takes any other attribute of its <section>.

slots

in react, the default slot is children and each named slot a prop of its name, a function where the slot hands values; in vue, a slot; in svelte, a snippet.

legend
Controls that belong to the frame, such as a toggle or a count, in its top row beside title.
legendEnd
Controls at the far end of the frame's top row, the stroke running on between them and title.
default
The frame's content, a cell inside its ring.