Form text

    Create block-level or inline-level form text.

    Overview

    Block-level help text in forms can be created using <Form.Text>. Inline help text can be flexibly implemented using any inline HTML element and utility classes like .text-muted.

    Form text below inputs can be styled with <Form.Text>. This component includes display: block and adds some top margin for easy spacing from the inputs above.

    API

    import Form from 'react-bootstrap/Form'Copy import code for the Form component
    NameTypeDefaultDescription
    ref
    ReactRef

    The FormText ref will be forwarded to the underlying element. Unless the FormText is rendered as a composite component, it will be a DOM node, when resolved.

    as
    elementType
    <small>

    You can use a custom element type for this component.

    muted
    boolean

    A convenience prop for add the text-muted class, since it's so commonly used here.

    bsPrefix
    string
    'form-text'

    Change the underlying component CSS base class name and modifier class names prefix. This is an escape hatch for working with heavily customized bootstrap css.