widgets
RadiusValue
module-attribute
RadiusValue = Literal[
"2xs",
"xs",
"sm",
"md",
"lg",
"xl",
"2xl",
"3xl",
"4xl",
"full",
"100%",
"none",
]
Allowed corner radius tokens.
TextAlign
module-attribute
Horizontal text alignment options.
IconSize
module-attribute
Icon size tokens.
TitleSize
module-attribute
Title text size tokens.
Alignment
module-attribute
Flexbox alignment options.
Justification
module-attribute
Flexbox justification options.
ControlVariant
module-attribute
Button and input style variants.
ControlSize
module-attribute
Button and input size variants.
WidgetStatus
module-attribute
WidgetStatus = (
WidgetStatusWithFavicon | WidgetStatusWithIcon
)
Union for representing widget status messaging.
CurveType
module-attribute
CurveType = Literal[
"basis",
"basisClosed",
"basisOpen",
"bumpX",
"bumpY",
"bump",
"linear",
"linearClosed",
"natural",
"monotoneX",
"monotoneY",
"monotone",
"step",
"stepBefore",
"stepAfter",
]
Interpolation curve types for area
and line
series.
Series
module-attribute
Series = Annotated[
BarSeries | AreaSeries | LineSeries,
Field(discriminator="type"),
]
Union of all supported chart series types.
WidgetComponent
module-attribute
WidgetComponent = Annotated[
Text
| Title
| Caption
| Chart
| Badge
| Markdown
| Box
| Row
| Col
| Divider
| Icon
| Image
| ListViewItem
| Button
| Checkbox
| Spacer
| Select
| DatePicker
| Form
| Input
| Label
| RadioGroup
| Textarea
| Transition,
Field(discriminator="type"),
]
Union of all renderable widget components.
WidgetIcon
module-attribute
WidgetIcon = Literal[
"agent",
"analytics",
"atom",
"bolt",
"book-open",
"book-clock",
"book-closed",
"calendar",
"chart",
"check",
"check-circle",
"check-circle-filled",
"chevron-left",
"chevron-right",
"circle-question",
"compass",
"confetti",
"cube",
"desktop",
"document",
"dot",
"dots-horizontal",
"dots-vertical",
"empty-circle",
"external-link",
"globe",
"keys",
"lab",
"images",
"info",
"lifesaver",
"lightbulb",
"mail",
"map-pin",
"maps",
"mobile",
"name",
"notebook",
"notebook-pencil",
"page-blank",
"phone",
"play",
"plus",
"profile",
"profile-card",
"reload",
"star",
"star-filled",
"search",
"sparkle",
"sparkle-double",
"square-code",
"square-image",
"square-text",
"suitcase",
"settings-slider",
"user",
"wreath",
"write",
"write-alt",
"write-alt2",
]
Icon names accepted by widgets that render icons.
ThemeColor
Bases: TypedDict
Color values for light and dark themes.
Source code in chatkit/widgets.py
Spacing
Bases: TypedDict
Shorthand spacing values applied to a widget.
Source code in chatkit/widgets.py
top
instance-attribute
Top spacing; accepts a spacing unit or CSS string.
right
instance-attribute
Right spacing; accepts a spacing unit or CSS string.
bottom
instance-attribute
Bottom spacing; accepts a spacing unit or CSS string.
left
instance-attribute
Left spacing; accepts a spacing unit or CSS string.
x
instance-attribute
Horizontal spacing; accepts a spacing unit or CSS string.
Border
Bases: TypedDict
Border style definition for an edge.
Source code in chatkit/widgets.py
color
instance-attribute
color: NotRequired[str | ThemeColor]
Border color; accepts border color token, a primitive color token, a CSS string, or theme-aware { light, dark }
.
Valid tokens: default
subtle
strong
Primitive color token: e.g. red-100
, blue-900
, gray-500
Borders
Bases: TypedDict
Composite border configuration applied across edges.
Source code in chatkit/widgets.py
MinMax
Bases: TypedDict
Integer minimum/maximum bounds.
Source code in chatkit/widgets.py
EditableProps
Bases: TypedDict
Editable field options for text widgets.
Source code in chatkit/widgets.py
autoFocus
instance-attribute
Autofocus the editable input when it appears.
autoComplete
instance-attribute
Native autocomplete hint for the input.
allowAutofillExtensions
instance-attribute
Allow browser password/autofill extensions.
placeholder
instance-attribute
Placeholder text for the editable input.
WidgetComponentBase
Bases: BaseModel
Base Pydantic model for all ChatKit widget components.
Source code in chatkit/widgets.py
WidgetStatusWithFavicon
Bases: TypedDict
Widget status representation using a favicon.
Source code in chatkit/widgets.py
WidgetStatusWithIcon
Bases: TypedDict
Widget status representation using an icon.
Source code in chatkit/widgets.py
ListViewItem
Bases: WidgetComponentBase
Single row inside a ListView
component.
Source code in chatkit/widgets.py
onClickAction
class-attribute
instance-attribute
Optional action triggered when the list item is clicked.
gap
class-attribute
instance-attribute
Gap between children within the list item; spacing unit or CSS string.
align
class-attribute
instance-attribute
align: Alignment | None = None
Y-axis alignment for content within the list item.
ListView
Bases: WidgetComponentBase
Container component for rendering collections of list items.
Source code in chatkit/widgets.py
limit
class-attribute
instance-attribute
Max number of items to show before a "Show more" control.
status
class-attribute
instance-attribute
status: WidgetStatus | None = None
Optional status header displayed above the list.
CardAction
Bases: TypedDict
Configuration for confirm/cancel actions within a card.
Source code in chatkit/widgets.py
Card
Bases: WidgetComponentBase
Versatile container used for structuring widget content.
Source code in chatkit/widgets.py
asForm
class-attribute
instance-attribute
Treat the card as an HTML form so confirm/cancel capture form data.
children
instance-attribute
Child components rendered inside the card.
background
class-attribute
instance-attribute
background: str | ThemeColor | None = None
Background color; accepts background color token, a primitive color token, a CSS string, or theme-aware { light, dark }
.
Valid tokens: surface
surface-secondary
surface-tertiary
surface-elevated
surface-elevated-secondary
Primitive color token: e.g. red-100
, blue-900
, gray-500
size
class-attribute
instance-attribute
Visual size of the card; accepts a size token. No preset default is documented.
padding
class-attribute
instance-attribute
padding: float | str | Spacing | None = None
Inner spacing of the card; spacing unit, CSS string, or padding object.
status
class-attribute
instance-attribute
status: WidgetStatus | None = None
Optional status header displayed above the card.
collapsed
class-attribute
instance-attribute
Collapse card body after the main action has completed.
confirm
class-attribute
instance-attribute
confirm: CardAction | None = None
Confirmation action button shown in the card footer.
cancel
class-attribute
instance-attribute
cancel: CardAction | None = None
Cancel action button shown in the card footer.
Markdown
Bases: WidgetComponentBase
Widget rendering Markdown content, optionally streamed.
Source code in chatkit/widgets.py
Text
Bases: WidgetComponentBase
Widget rendering plain text with typography controls.
Source code in chatkit/widgets.py
streaming
class-attribute
instance-attribute
Enables streaming-friendly transitions for incremental updates.
lineThrough
class-attribute
instance-attribute
Render text with a line-through decoration.
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Text color; accepts a text color token, a primitive color token, a CSS color string, or a theme-aware { light, dark }
.
Text color tokens: prose
primary
emphasis
secondary
tertiary
success
warning
danger
Primitive color token: e.g. red-100
, blue-900
, gray-500
weight
class-attribute
instance-attribute
Font weight; accepts a font weight token.
width
class-attribute
instance-attribute
Constrain the text container width; px or CSS string.
size
class-attribute
instance-attribute
size: TextSize | None = None
Size of the text; accepts a text size token.
textAlign
class-attribute
instance-attribute
textAlign: TextAlign | None = None
Horizontal text alignment.
truncate
class-attribute
instance-attribute
Truncate overflow with ellipsis.
minLines
class-attribute
instance-attribute
Reserve space for a minimum number of lines.
maxLines
class-attribute
instance-attribute
Limit text to a maximum number of lines (line clamp).
editable
class-attribute
instance-attribute
editable: Literal[False] | EditableProps | None = None
Enable inline editing for this text node.
Title
Bases: WidgetComponentBase
Widget rendering prominent headline text.
Source code in chatkit/widgets.py
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Text color; accepts a text color token, a primitive color token, a CSS color string, or a theme-aware { light, dark }
.
Text color tokens: prose
primary
emphasis
secondary
tertiary
success
warning
danger
Primitive color token: e.g. red-100
, blue-900
, gray-500
weight
class-attribute
instance-attribute
Font weight; accepts a font weight token.
size
class-attribute
instance-attribute
size: TitleSize | None = None
Size of the title text; accepts a title size token.
textAlign
class-attribute
instance-attribute
textAlign: TextAlign | None = None
Horizontal text alignment.
truncate
class-attribute
instance-attribute
Truncate overflow with ellipsis.
Caption
Bases: WidgetComponentBase
Widget rendering supporting caption text.
Source code in chatkit/widgets.py
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Text color; accepts a text color token, a primitive color token, a CSS color string, or a theme-aware { light, dark }
.
Text color tokens: prose
primary
emphasis
secondary
tertiary
success
warning
danger
Primitive color token: e.g. red-100
, blue-900
, gray-500
weight
class-attribute
instance-attribute
Font weight; accepts a font weight token.
size
class-attribute
instance-attribute
size: CaptionSize | None = None
Size of the caption text; accepts a caption size token.
textAlign
class-attribute
instance-attribute
textAlign: TextAlign | None = None
Horizontal text alignment.
truncate
class-attribute
instance-attribute
Truncate overflow with ellipsis.
Badge
Bases: WidgetComponentBase
Small badge indicating status or categorization.
Source code in chatkit/widgets.py
color
class-attribute
instance-attribute
color: (
Literal[
"secondary",
"success",
"danger",
"warning",
"info",
"discovery",
]
| None
) = None
Color of the badge; accepts a badge color token.
variant
class-attribute
instance-attribute
Visual style of the badge.
size
class-attribute
instance-attribute
Size of the badge.
BoxBase
Bases: BaseModel
Shared layout props for flexible container widgets.
Source code in chatkit/widgets.py
children
class-attribute
instance-attribute
Child components to render inside the container.
align
class-attribute
instance-attribute
align: Alignment | None = None
Cross-axis alignment of children.
justify
class-attribute
instance-attribute
justify: Justification | None = None
Main-axis distribution of children.
wrap
class-attribute
instance-attribute
Wrap behavior for flex items.
gap
class-attribute
instance-attribute
Gap between direct children; spacing unit or CSS string.
height
class-attribute
instance-attribute
Explicit height; px or CSS string.
width
class-attribute
instance-attribute
Explicit width; px or CSS string.
size
class-attribute
instance-attribute
Shorthand to set both width and height; px or CSS string.
minHeight
class-attribute
instance-attribute
Minimum height; px or CSS string.
minWidth
class-attribute
instance-attribute
Minimum width; px or CSS string.
minSize
class-attribute
instance-attribute
Shorthand to set both minWidth and minHeight; px or CSS string.
maxHeight
class-attribute
instance-attribute
Maximum height; px or CSS string.
maxWidth
class-attribute
instance-attribute
Maximum width; px or CSS string.
maxSize
class-attribute
instance-attribute
Shorthand to set both maxWidth and maxHeight; px or CSS string.
padding
class-attribute
instance-attribute
padding: float | str | Spacing | None = None
Inner padding; spacing unit, CSS string, or padding object.
margin
class-attribute
instance-attribute
margin: float | str | Spacing | None = None
Outer margin; spacing unit, CSS string, or margin object.
border
class-attribute
instance-attribute
Border applied to the container; px or border object/shorthand.
radius
class-attribute
instance-attribute
radius: RadiusValue | None = None
Border radius; accepts a radius token.
background
class-attribute
instance-attribute
background: str | ThemeColor | None = None
Background color; accepts background color token, a primitive color token, a CSS string, or theme-aware { light, dark }
.
Valid tokens: surface
surface-secondary
surface-tertiary
surface-elevated
surface-elevated-secondary
Primitive color token: e.g. red-100
, blue-900
, gray-500
Box
Bases: WidgetComponentBase
, BoxBase
Generic flex container with direction control.
Source code in chatkit/widgets.py
Row
Col
Form
Bases: WidgetComponentBase
, BoxBase
Form wrapper capable of submitting onSubmitAction
.
Source code in chatkit/widgets.py
Divider
Bases: WidgetComponentBase
Visual divider separating content sections.
Source code in chatkit/widgets.py
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Divider color; accepts border color token, a primitive color token, a CSS string, or theme-aware { light, dark }
.
Valid tokens: default
subtle
strong
Primitive color token: e.g. red-100
, blue-900
, gray-500
size
class-attribute
instance-attribute
Thickness of the divider line; px or CSS string.
spacing
class-attribute
instance-attribute
Outer spacing above and below the divider; spacing unit or CSS string.
Icon
Bases: WidgetComponentBase
Icon component referencing a built-in icon name.
Source code in chatkit/widgets.py
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Icon color; accepts a text color token, a primitive color token, a CSS color string, or a theme-aware { light, dark }
.
Text color tokens: prose
primary
emphasis
secondary
tertiary
success
warning
danger
Primitive color token: e.g. red-100
, blue-900
, gray-500
size
class-attribute
instance-attribute
size: IconSize | None = None
Size of the icon; accepts an icon size token.
Image
Bases: WidgetComponentBase
Image component with sizing and fitting controls.
Source code in chatkit/widgets.py
fit
class-attribute
instance-attribute
How the image should fit within the container.
position
class-attribute
instance-attribute
position: (
Literal[
"top left",
"top",
"top right",
"left",
"center",
"right",
"bottom left",
"bottom",
"bottom right",
]
| None
) = None
Focal position of the image within the container.
radius
class-attribute
instance-attribute
radius: RadiusValue | None = None
Border radius; accepts a radius token.
frame
class-attribute
instance-attribute
Draw a subtle frame around the image.
flush
class-attribute
instance-attribute
Flush the image to the container edge, removing surrounding padding.
height
class-attribute
instance-attribute
Explicit height; px or CSS string.
width
class-attribute
instance-attribute
Explicit width; px or CSS string.
size
class-attribute
instance-attribute
Shorthand to set both width and height; px or CSS string.
minHeight
class-attribute
instance-attribute
Minimum height; px or CSS string.
minWidth
class-attribute
instance-attribute
Minimum width; px or CSS string.
minSize
class-attribute
instance-attribute
Shorthand to set both minWidth and minHeight; px or CSS string.
maxHeight
class-attribute
instance-attribute
Maximum height; px or CSS string.
maxWidth
class-attribute
instance-attribute
Maximum width; px or CSS string.
maxSize
class-attribute
instance-attribute
Shorthand to set both maxWidth and maxHeight; px or CSS string.
margin
class-attribute
instance-attribute
margin: int | str | Spacing | None = None
Outer margin; spacing unit, CSS string, or margin object.
background
class-attribute
instance-attribute
background: str | ThemeColor | None = None
Background color; accepts background color token, a primitive color token, a CSS string, or theme-aware { light, dark }
.
Valid tokens: surface
surface-secondary
surface-tertiary
surface-elevated
surface-elevated-secondary
Primitive color token: e.g. red-100
, blue-900
, gray-500
aspectRatio
class-attribute
instance-attribute
Aspect ratio of the box (e.g., 16/9); number or CSS string.
Button
Bases: WidgetComponentBase
Button component optionally wired to an action.
Source code in chatkit/widgets.py
submit
class-attribute
instance-attribute
Configure the button as a submit button for the nearest form.
label
class-attribute
instance-attribute
Text to display inside the button.
onClickAction
class-attribute
instance-attribute
Action dispatched on click.
iconStart
class-attribute
instance-attribute
iconStart: WidgetIcon | None = None
Icon shown before the label; can be used for icon-only buttons.
iconEnd
class-attribute
instance-attribute
iconEnd: WidgetIcon | None = None
Optional icon shown after the label.
style
class-attribute
instance-attribute
Convenience preset for button style.
iconSize
class-attribute
instance-attribute
Controls the size of icons within the button; accepts an icon size token.
color
class-attribute
instance-attribute
color: (
Literal[
"primary",
"secondary",
"info",
"discovery",
"success",
"caution",
"warning",
"danger",
]
| None
) = None
Color of the button; accepts a button color token.
variant
class-attribute
instance-attribute
variant: ControlVariant | None = None
Visual variant of the button; accepts a control variant token.
size
class-attribute
instance-attribute
size: ControlSize | None = None
Controls the overall size of the button.
pill
class-attribute
instance-attribute
Determines if the button should be fully rounded (pill).
uniform
class-attribute
instance-attribute
Determines if the button should have matching width and height.
block
class-attribute
instance-attribute
Extend the button to 100% of the available width.
Spacer
Bases: WidgetComponentBase
Flexible spacer used to push content apart.
Source code in chatkit/widgets.py
SelectOption
Bases: TypedDict
Selectable option used by the Select
widget.
Source code in chatkit/widgets.py
Select
Bases: WidgetComponentBase
Select dropdown component.
Source code in chatkit/widgets.py
onChangeAction
class-attribute
instance-attribute
Action dispatched when the value changes.
placeholder
class-attribute
instance-attribute
Placeholder text shown when no value is selected.
defaultValue
class-attribute
instance-attribute
Initial value of the select.
variant
class-attribute
instance-attribute
variant: ControlVariant | None = None
Visual style of the select; accepts a control variant token.
size
class-attribute
instance-attribute
size: ControlSize | None = None
Controls the size of the select control.
pill
class-attribute
instance-attribute
Determines if the select should be fully rounded (pill).
block
class-attribute
instance-attribute
Extend the select to 100% of the available width.
clearable
class-attribute
instance-attribute
Show a clear control to unset the value.
DatePicker
Bases: WidgetComponentBase
Date picker input component.
Source code in chatkit/widgets.py
onChangeAction
class-attribute
instance-attribute
Action dispatched when the date value changes.
placeholder
class-attribute
instance-attribute
Placeholder text shown when no date is selected.
defaultValue
class-attribute
instance-attribute
Initial value of the date picker.
min
class-attribute
instance-attribute
Earliest selectable date (inclusive).
max
class-attribute
instance-attribute
Latest selectable date (inclusive).
variant
class-attribute
instance-attribute
variant: ControlVariant | None = None
Visual variant of the datepicker control.
size
class-attribute
instance-attribute
size: ControlSize | None = None
Controls the size of the datepicker control.
side
class-attribute
instance-attribute
Preferred side to render the calendar.
align
class-attribute
instance-attribute
Preferred alignment of the calendar relative to the control.
pill
class-attribute
instance-attribute
Determines if the datepicker should be fully rounded (pill).
block
class-attribute
instance-attribute
Extend the datepicker to 100% of the available width.
clearable
class-attribute
instance-attribute
Show a clear control to unset the value.
Checkbox
Bases: WidgetComponentBase
Checkbox input component.
Source code in chatkit/widgets.py
label
class-attribute
instance-attribute
Optional label text rendered next to the checkbox.
defaultChecked
class-attribute
instance-attribute
The initial checked state of the checkbox.
onChangeAction
class-attribute
instance-attribute
Action dispatched when the checked state changes.
disabled
class-attribute
instance-attribute
Disable interactions and apply disabled styles.
Input
Bases: WidgetComponentBase
Single-line text input component.
Source code in chatkit/widgets.py
inputType
class-attribute
instance-attribute
Native input type.
defaultValue
class-attribute
instance-attribute
Initial value of the input.
required
class-attribute
instance-attribute
Mark the input as required for form submission.
pattern
class-attribute
instance-attribute
Regex pattern for input validation.
placeholder
class-attribute
instance-attribute
Placeholder text shown when empty.
allowAutofillExtensions
class-attribute
instance-attribute
Allow password managers / autofill extensions to appear.
autoSelect
class-attribute
instance-attribute
Select all contents of the input when it mounts.
autoFocus
class-attribute
instance-attribute
Autofocus the input when it mounts.
disabled
class-attribute
instance-attribute
Disable interactions and apply disabled styles.
variant
class-attribute
instance-attribute
Visual style of the input.
size
class-attribute
instance-attribute
size: ControlSize | None = None
Controls the size of the input control.
gutterSize
class-attribute
instance-attribute
Controls gutter on the edges of the input; overrides value from size
.
Label
Bases: WidgetComponentBase
Form label associated with a field.
Source code in chatkit/widgets.py
size
class-attribute
instance-attribute
size: TextSize | None = None
Size of the label text; accepts a text size token.
weight
class-attribute
instance-attribute
Font weight; accepts a font weight token.
textAlign
class-attribute
instance-attribute
textAlign: TextAlign | None = None
Horizontal text alignment.
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Text color; accepts a text color token, a primitive color token, a CSS color string, or a theme-aware { light, dark }
.
Text color tokens: prose
primary
emphasis
secondary
tertiary
success
warning
danger
Primitive color token: e.g. red-100
, blue-900
, gray-500
RadioOption
Bases: TypedDict
Option inside a RadioGroup
widget.
Source code in chatkit/widgets.py
RadioGroup
Bases: WidgetComponentBase
Grouped radio input control.
Source code in chatkit/widgets.py
options
class-attribute
instance-attribute
options: list[RadioOption] | None = None
Array of options to render as radio items.
ariaLabel
class-attribute
instance-attribute
Accessible label for the radio group; falls back to name
.
onChangeAction
class-attribute
instance-attribute
Action dispatched when the selected value changes.
defaultValue
class-attribute
instance-attribute
Initial selected value of the radio group.
direction
class-attribute
instance-attribute
Layout direction of the radio items.
disabled
class-attribute
instance-attribute
Disable interactions and apply disabled styles for the entire group.
Textarea
Bases: WidgetComponentBase
Multiline text input component.
Source code in chatkit/widgets.py
defaultValue
class-attribute
instance-attribute
Initial value of the textarea.
required
class-attribute
instance-attribute
Mark the textarea as required for form submission.
pattern
class-attribute
instance-attribute
Regex pattern for input validation.
placeholder
class-attribute
instance-attribute
Placeholder text shown when empty.
autoSelect
class-attribute
instance-attribute
Select all contents of the textarea when it mounts.
autoFocus
class-attribute
instance-attribute
Autofocus the textarea when it mounts.
disabled
class-attribute
instance-attribute
Disable interactions and apply disabled styles.
variant
class-attribute
instance-attribute
Visual style of the textarea.
size
class-attribute
instance-attribute
size: ControlSize | None = None
Controls the size of the textarea control.
gutterSize
class-attribute
instance-attribute
Controls gutter on the edges of the textarea; overrides value from size
.
autoResize
class-attribute
instance-attribute
Automatically grow/shrink to fit content.
maxRows
class-attribute
instance-attribute
Maximum number of rows when auto-resizing.
Transition
Bases: WidgetComponentBase
Wrapper enabling transitions for a child component.
Source code in chatkit/widgets.py
children
instance-attribute
children: WidgetComponent | None
The child component to animate layout changes for.
Chart
Bases: WidgetComponentBase
Data visualization component for simple bar/line/area charts.
Source code in chatkit/widgets.py
data
instance-attribute
Tabular data for the chart, where each row maps field names to values.
series
instance-attribute
series: list[Series]
One or more series definitions that describe how to visualize data fields.
xAxis
instance-attribute
xAxis: str | XAxisConfig
X-axis configuration; either a dataKey
string or a config object.
showYAxis
class-attribute
instance-attribute
Controls whether the Y axis is rendered.
showLegend
class-attribute
instance-attribute
Controls whether a legend is rendered.
showTooltip
class-attribute
instance-attribute
Controls whether a tooltip is rendered when hovering over a datapoint.
barGap
class-attribute
instance-attribute
Gap between bars within the same category (in px).
barCategoryGap
class-attribute
instance-attribute
Gap between bar categories/groups (in px).
flex
class-attribute
instance-attribute
Flex growth/shrink factor for layout.
height
class-attribute
instance-attribute
Explicit height; px or CSS string.
width
class-attribute
instance-attribute
Explicit width; px or CSS string.
size
class-attribute
instance-attribute
Shorthand to set both width and height; px or CSS string.
minHeight
class-attribute
instance-attribute
Minimum height; px or CSS string.
minWidth
class-attribute
instance-attribute
Minimum width; px or CSS string.
minSize
class-attribute
instance-attribute
Shorthand to set both minWidth and minHeight; px or CSS string.
maxHeight
class-attribute
instance-attribute
Maximum height; px or CSS string.
maxWidth
class-attribute
instance-attribute
Maximum width; px or CSS string.
maxSize
class-attribute
instance-attribute
Shorthand to set both maxWidth and maxHeight; px or CSS string.
XAxisConfig
Bases: TypedDict
Configuration object for the X axis.
Source code in chatkit/widgets.py
BarSeries
Bases: BaseModel
A bar series plotted from a numeric dataKey
. Supports stacking.
Source code in chatkit/widgets.py
dataKey
instance-attribute
Field name from each data row that contains the numeric value.
stack
class-attribute
instance-attribute
Optional stack group ID. Series with the same ID stack together.
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Color for the series; accepts chart color token, a primitive color token, a CSS string, or theme-aware { light, dark }.
Chart color tokens: blue
purple
orange
green
red
yellow
pink
Primitive color token, e.g., red-100
, blue-900
, gray-500
Note: By default, a color will be sequentially assigned from the chart series colors.
AreaSeries
Bases: BaseModel
An area series plotted from a numeric dataKey
. Supports stacking and curves.
Source code in chatkit/widgets.py
dataKey
instance-attribute
Field name from each data row that contains the numeric value.
stack
class-attribute
instance-attribute
Optional stack group ID. Series with the same ID stack together.
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Color for the series; accepts chart color token, a primitive color token, a CSS string, or theme-aware { light, dark }.
Chart color tokens: blue
purple
orange
green
red
yellow
pink
Primitive color token, e.g., red-100
, blue-900
, gray-500
Note: By default, a color will be sequentially assigned from the chart series colors.
curveType
class-attribute
instance-attribute
curveType: None | Literal[CurveType] = None
Interpolation curve type used to connect points.
LineSeries
Bases: BaseModel
A line series plotted from a numeric dataKey
. Supports curves.
Source code in chatkit/widgets.py
dataKey
instance-attribute
Field name from each data row that contains the numeric value.
color
class-attribute
instance-attribute
color: str | ThemeColor | None = None
Color for the series; accepts chart color token, a primitive color token, a CSS string, or theme-aware { light, dark }.
Chart color tokens: blue
purple
orange
green
red
yellow
pink
Primitive color token, e.g., red-100
, blue-900
, gray-500
Note: By default, a color will be sequentially assigned from the chart series colors.
curveType
class-attribute
instance-attribute
curveType: None | Literal[CurveType] = None
Interpolation curve type used to connect points.