Icon Button

Examples

Variants

Dark Modern
import {ReactNode} from "react"
import {IconButton} from "@qui/react-vscode"
export default function Variants(): ReactNode {
return (
<div className="flex flex-col gap-4">
<IconButton icon="link-external" />
<IconButton icon="link-external" variant="secondary" />
<IconButton disabled icon="link-external" />
</div>
)
}

API

IconButtonProps

Name & DescriptionOption(s)Default
If supplied as a string, the vscode codicon will be applied. Supply as a ReactElement for additional customization.
| string
| ReactElement
The component used for the root node. It can be a React component or element.
| ElementType
| ComponentType
'button'
Controls the component's interactivity. If true, the component is rendered non-interactive and visually dimmed to signal its disabled state.
boolean
The style variant of the button.
| 'primary'
| 'secondary'
| 'outline'
'primary'
Type
| string
| ReactElement
Description
If supplied as a string, the vscode codicon will be applied. Supply as a ReactElement for additional customization.
Type
| ElementType
| ComponentType
Default
'button'
Description
The component used for the root node. It can be a React component or element.
Type
boolean
Description
Controls the component's interactivity. If true, the component is rendered non-interactive and visually dimmed to signal its disabled state.
Type
| 'primary'
| 'secondary'
| 'outline'
Default
'primary'
Description
The style variant of the button.