Forms

Rich Text

Minimal rich text editor with configurable actions, emoji support, and character limits.

Rich Editor

A minimal contentEditable wrapper with basic formatting.

'use client'

import React from 'react'
import { RichText } from 'biibaos'

export default function App() {
  return (
    <RichText
          label="Post Content"
          placeholder="What's on your mind? ✨"
          defaultValue="<h1>Hello World</h1><p>Start typing your story...</p>"
        />
  )
}

Character Limit

Restrict the length of the input with a visual counter.

'use client'

import React from 'react'
import { RichText } from 'biibaos'

export default function App() {
  return (
    <RichText
          label="Short Bio"
          maxLength={100}
          placeholder="Tell us about yourself..."
          actions={['bold', 'italic', 'emoji']}
        />
  )
}

Custom Actions

Configure exactly which tools are available to the user.

'use client'

import React from 'react'
import { RichText } from 'biibaos'

export default function App() {
  return (
    <RichText
          label="Simple Comment"
          actions={['bold', 'link', 'emoji']}
          placeholder="Bold and links only..."
        />
  )
}

Properties

PropTypeDefaultDescription
labelstringPrimary text label
defaultValuestring""Initial HTML text content
placeholderstring"Type something..."Ghost placeholder text displayed inside empty editor
onChange(value: string) => voidCallback triggered on text input
actions('bold' | 'italic' | 'underline' | 'link' | 'heading' | 'list' | 'emoji')[]['bold', 'italic', 'heading', 'list', 'emoji']Enabled formatting tools
maxLengthnumberMaximum character limit constraint
errorstringValidation error text message
hintstringSupporting instructional helper text
disabledbooleanfalseDisable content editing and actions
requiredbooleanfalseRenders an asterisk indicating required form field