Upper toolbar is a guidance pattern to allow designers create their own toolbars for edition with preview pages.
install yarn add @clayui/upper-toolbar version use import UpperToolbar from '@clayui/upper-toolbar' ;
Warning
This component has been discontinued in favor of ClayToolbar, you can get the
same
result .
Introduction
The Upper Toolbar components can be composed together to make all sorts of toolbar variations. Combine Upper Toolbar with other Clay components to cover a variety of use cases.
Example
import {Provider } from '@clayui/core' ;
import UpperToolbar from '@clayui/upper-toolbar' ;
import {ClayDropDownWithItems } from '@clayui/drop-down' ;
import Button , {ClayButtonWithIcon } from '@clayui/button' ;
import Icon from '@clayui/icon' ;
import React from 'react' ;
export default function App () {
return (
<Provider spritemap = "/icons.svg" >
<div className = "p-4" >
<UpperToolbar >
<UpperToolbar . Item className = "text-left" expand >
<label className = "component-title" >{'Foo Bar' }</label >
<Icon symbol = "lock" />
</UpperToolbar . Item >
<UpperToolbar . Input placeholder = "Search..." />
<UpperToolbar . Item >
<Button . Group >
<ClayButtonWithIcon
displayType = "secondary"
onClick = {() => {}}
small
symbol = "angle-left"
/>
<ClayButtonWithIcon
displayType = "secondary"
onClick = {() => {}}
small
symbol = "angle-right"
/>
</Button . Group >
</UpperToolbar . Item >
<UpperToolbar . Item >
<Button displayType = "secondary" onClick = {() => {}}>
{'Delete' }
</Button >
<Button className = "inline-item-after" onClick = {() => {}}>
{'Edit' }
</Button >
</UpperToolbar . Item >
<UpperToolbar . Item >
<ClayDropDownWithItems
items = {[
{href : '#one' , label : 'one' },
{href : '#two' , label : 'two' },
{
disabled : true ,
href : '#three' ,
label : 'three' ,
},
{href : '#four' , label : 'four' },
]}
trigger = {
<ClayButtonWithIcon
displayType = "unstyled"
small
symbol = "ellipsis-v"
/>
}
/>
</UpperToolbar . Item >
</UpperToolbar >
</div >
</Provider >
);
}Show code API Reference { ({ className , ... otherProps }: IInputProps ): JSX .Element ; displayName : string ; }
Parameters component "input" | "textarea" | React .ForwardRefExoticComponent < any > | undefined
Input component to render. Can either be a string like ‘input’ or ‘textarea’ or a component.
insetAfter boolean | undefined
Flag to indicate if input - group - inset - after
class should be applied
insetBefore boolean | undefined
Flag to indicate if input - group - inset - before
class should be applied
sizing "lg" | "regular" | "sm" | undefined
Selects the height of the input.
Returns Element
Item { ({ children , className , expand , ... otherProps }: IItemProps ): JSX .Element ; displayName : string ; }
Parameters Properties expand boolean | undefined
Flag to indicate if Item should auto expand to fill the remaining width.
Returns Element{ ({ children , className , ... otherProps }: React .HTMLAttributes < HTMLElement > ): JSX .Element ; displayName : string ; Item : { ({ children , className , expand , ... otherProps }: IItemProps ): JSX .Element ; displayName : string ; }; Input : { ({ className , ... otherProps }: IInputProps ): JSX .Element ; displayName : string ; }; }
Edit this page on GitHub Contributors
Matuzalém Teles, Bryce Osterhaus, Krešimir Čoko
Last edited May 11, 2025 at 5:57:01 PM