Rename

A component for renaming stuff.

chore: bump deps

Value: chore: bump deps

Installation

jsrepo add ui/rename

Usage

Content Editable

When in content editable mode the user can click on the text to start editing it.

feat: add rename component

Value: feat: add rename component

External Control

You can put the Rename component into edit mode by using the Edit component or by setting the mode prop to 'edit'.

Right click or press F2 to rename files.

API Reference

Rename.

Root

Inline rename component that toggles between a text view and an input for editing.

PropTypeDefault
id?
string -
this?
enum -
mode? $bindable
enum view
blurBehavior?
enum -
fallbackSelectionBehavior?
enum end
value $bindable
string -
class?
string -
inputClass?
string -
textClass?
string -
onSave?
function -
onCancel?
function -
validate?
function () => true
Rename.

Provider

Context provider enabling external Edit/Cancel/Save buttons to control the current Rename input.

Rename.

Edit

Button that switches the current Rename input into edit mode.

PropTypeDefault
child?
Snippet -
Rename.

Cancel

Button that cancels editing and returns to view mode.

PropTypeDefault
child?
Snippet -
Rename.

Save

Button that triggers save on the current Rename input.

PropTypeDefault
child?
Snippet -