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</h1><p>Start typing...</p>"
      onChange={(html) => console.log(html)}
    />
  )
}

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}
      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="Description"
      placeholder="Type something here..."
      maxLength={500}
      onChange={(content) => console.log(content)}
    />
  )
}

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