Editable

EditableText is used for inline renaming of some text. It appears as normal UI text but transforms into a text input field when the user clicks or focuses on it.

Import#

import { Editable } from '@chakra-ui/react'

Usage#

The editable's text input and preview inherits all font styling from the root Editable container in order to make the edit and read view transition seamless.

Usage with textarea#

With custom input and controls#

In some cases, you might need to use custom controls to toggle the edit and read mode. We use the render prop pattern to provide access to the internal state of the component.

You may want to customize the Editable.Input as well. This can be achieved by using a custom Input component in the as prop.

Proudly made inNigeria by Segun Adebayo

Deployed by Vercel