Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
ActionsReact Native

Toolbar

Group compact buttons and toggles in one framed row or column.

Public APILumenToolbarReact Native

Native example

Use Toolbar

Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.

Toolbar rendered in the Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Toolbar demo
tsx
import { useState } from 'react'
import {
  LumenButton,
  LumenDivider,
  LumenIconButton,
  LumenToggleButton,
  LumenToolbar
} from '@santi020k/lumen-react-native'

export const FormattingToolbar = ({ onComment, onLink }: { onComment: () => void; onLink: () => void }) => {
  const [bold, setBold] = useState(false)
  const [italic, setItalic] = useState(false)

  return (
    <LumenToolbar label="Text formatting">
      <LumenToggleButton icon="letter-b" iconOnly label="Bold" onPressedChange={setBold} pressed={bold} />
      <LumenToggleButton icon="italic" iconOnly label="Italic" onPressedChange={setItalic} pressed={italic} />
      <LumenDivider />
      <LumenIconButton label="Insert link" name="link" onPress={onLink} />
      <LumenDivider />
      <LumenButton intent="quiet" onPress={onComment}>
        Comment
      </LumenButton>
    </LumenToolbar>
  )
}
React Native
Frames compact buttons and toggles in one named row or column, split by dividers.

Reference

Public API

The primary shared and platform-specific options exposed by LumenToolbar.

APIValues or typeDefaultDescription
label / orientation / contentaccessible name / row or column / controlsToolbar / horizontal / requiredSplit related controls with separators.

Native behavior

Design and accessibility

When to use it

Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.

Accessibility

A named toolbar; each control keeps its own name and pressed state.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives