rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

Editable

Inline editable text that toggles between display and input mode on click or focus.

Examples

Basic Click-to-Edit

Click the text to enter edit mode. Press Enter to save.

Untitled project

With Placeholder

Shows placeholder text when the value is empty.

With Save / Cancel

Explicit Save and Cancel buttons instead of keyboard-only confirmation.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { Editable } from "@rokle/components";
import { Editable } from "@rokle/components";

export function Example() {
  return <Editable />;
}

API Reference

PropTypeDefaultDescription
valuestring-Current text value.
onValueChange(value: string) => void-Called when editing is committed.
placeholderstring"Click to edit"Placeholder shown when value is empty.