Fusion UI LogoFusion UI Logo
Fusion UI LogoFusion UI Logo
/
Getting Started
Concepts
Components
Example Apps
Getting Started
Concepts
Components
Example Apps
Fusion UI LogoFusion UI Logo
Getting Started
Concepts
Components
Example Apps
Overview
Actions
Button
Button Group
Segmented Button
Deprecated
Split Button
Toggle Button
Click To Copy
Toolbar
Navigation
Main Nav
Side Menu
Page Header
Tabs
Breadcrumbs
On-Page Menu
Link
Command Menu
Application Switcher
Context Switcher
Account Menu
Menu Bar
Deprecated
Inputs & Forms
Form
Form Actions
Deprecated
Form Divider
Form Field
Form Repeat
Form Spacing
Input
Prefix & Suffix
Rich Text Input
Autocomplete
Select
Date / Time Input
Calendar
Slider
Selection
Checkbox
Radio
Switch
Switch Select
Chip
Chip Choice
Chip Filter
Chip Input
Chip Sortable
Visual Select
Pricing Plan Select
Feedback & Loading
Banner
Inline Message
Snackbar
Inline Snackbar
Loading Spinner
Skeleton
Text Skeleton
Contextual Information
Badge
Status
Tag
Tooltip
Info
Hotkey
Icon
Icon Sizer
Containers & Overlays
Tile
Tile Content
Tile Footer
Tile Header
Annotated Section
Modal
Sheet
Popover
Context Menu
Data Display
Data Table
List
Timeline
Data Visualization
KPI Card
Ratio Card
Bar Chart
Line Chart
Pie Chart
Heatmap Calendar
Layout
Container
Stack Layout
Flow Layout
Internals
Blanket
Expansion Panel
Menu List Base
Menu Group
Search Bar
Components
...
Rich Text Input

Rich Text Input

Text field with formatting like bold, lists and links.

Overview

RichTextInput edits formatted text: descriptions, comments or notes. Its RichText value is a JSON object that can be stored and restored without losing the structure.

Description
Enter your description here...
This is a rich text editor powered by Lexical
"use client";
import React, {useState} from "react";
import {RichTextInput, RichText} from "@brynlabs/fusion-ui";
export const BasicUsageExample = () => {
const [value, setValue] = useState<RichText | null>(null);
return (
<RichTextInput
label="Description"
placeholder="Enter your description here..."
value={value}
onChange={setValue}
hint="This is a rich text editor powered by Lexical"
/>
);
};

Validation

Required Field*
This field is required
Invalid Field
This field has an error
This field is required
"use client";
import React, {useState} from "react";
import {RichTextInput, RichText, FormSpacing} from "@brynlabs/fusion-ui";
export const ValidationExample = () => {
const [requiredValue, setRequiredValue] = useState<RichText | null>(null);
const [invalidValue, setInvalidValue] = useState<RichText | null>(null);
return (
<FormSpacing>
<RichTextInput
label="Required Field"
placeholder="This field is required"
value={requiredValue}
onChange={setRequiredValue}
required={true}
/>
<RichTextInput
label="Invalid Field"
placeholder="This field has an error"
value={invalidValue}
onChange={setInvalidValue}
invalid={true}
errorMessage="This field is required"
/>
</FormSpacing>
);
};

Disabled

Disabled Example
Enter your description here...
This is a rich text editor powered by Lexical
"use client";
import React, {useState} from "react";
import {RichText, RichTextInput} from "@brynlabs/fusion-ui";
export const DisabledExample = () => {
const [value, setValue] = useState<RichText | null>(null);
return (
<RichTextInput
label="Disabled Example"
placeholder="Enter your description here..."
value={value}
onChange={setValue}
disabled={true}
hint="This is a rich text editor powered by Lexical"
/>
);
};
On this page
  • Overview
  • Validation
  • Disabled