FooterText

Text the reader types, in a hairline field whose edge darkens to the page's ink while it is being typed in.

@internote/canvas-sdk/reactComponent
On this page
import { FooterText } from '@internote/canvas-sdk/react';

One line by default, where Enter calls onSubmit. multiline makes it a field that grows with what is written, where Enter starts a new line and ⌘/Ctrl+Enter calls onSubmit. monospace sets the field — its text and its placeholder alike — in a face whose characters do not run together, for text read symbol by symbol such as a maths answer. The ref reaches the element, for a caller that inserts at the caret.

#Props

Also takes className. Any other prop is passed to the rendered element.

ariaLabel
The field's accessible name, when no visible label names it.
string
describedBy
The id of an element that describes the field, such as a preview of what was typed.
string
disabled
Whether the field is shown but cannot be typed in.
boolean
invalid
Whether to mark the text as not one the environment can use.
boolean
labelledBy
The id of the element that names the field, such as a question's prompt.
string
monospace
Set the field, placeholder included, in a monospaced face.
boolean
multiline
Let the text run to several lines, the field growing to hold them.
boolean
onChangeRequired
Called with the new text on every keystroke.
(value: string) => void
onSubmit
Called when the reader submits: Enter on one line, ⌘/Ctrl+Enter on several.
() => void
placeholder
Shown while the field is empty.
string
valueRequired
What is in the field.
string

Declared in packages/canvas-sdk/src/react/footer-controls.tsx:59.

Last updated