Skip to main content

fast-text-area

An implementation of an HTML textarea element as a form-connected web-component. The fast-text-area supports two visual appearances, outline and filled, with the control defaulting to the outline appearance.

Setup#

import {    provideFASTDesignSystem,    fastTextArea} from "@microsoft/fast-components";
provideFASTDesignSystem()    .register(        fastTextArea()    );

Usage#

Live Editor
Result
SyntaxError: Unexpected token (1:8)
1 : return ()
            ^

Create your own design#

import {    TextArea,    textAreaTemplate as template,} from "@microsoft/fast-foundation";import { textAreaStyles as styles } from "./my-text-area.styles";
export const myTextArea = TextArea.compose({    baseName: "text-area",    template,    styles,    shadowOptions: {        delegatesFocus: true,    },});
note

This component is built with the expectation that focus is delegated to the input element rendered into the shadow DOM.

Additional resources#