Icon Button
Icon buttons help people take minor actions with one tap
import { IconButton } from '@cerberus/react'
Usage
The IconButton API is similar to the Button, but with the addition of an ariaLabel
prop.
Customization
You can customize the button by utilizing the cx
function.
API
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { ariaLabel: string palette?: 'action' | 'secondaryAction' | 'danger' size?: 'sm' | 'lg' usage?: 'filled' | 'ghost' | 'outlined' asChild?: boolean}
define function IconButton(props: IconButtonProps): ReactNode
Props
The IconButton
component accepts the following props:
Name | Default | Description |
---|---|---|
ariaLabel | "Icon Button" | The accessible label for the button. |
palette | action | The color palette of the button. |
usage | ghost | The style treatment of the button. |
size | lg | The size of the button. |
asChild | Render the Button as the child component. |
import { IconButton } from '@cerberus/react'
Usage
The IconButton API is similar to the Button, but with the addition of an ariaLabel
prop.
Customization
You can customize the button by utilizing the cx
function.
API
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { ariaLabel: string palette?: 'action' | 'secondaryAction' | 'danger' size?: 'sm' | 'lg' usage?: 'filled' | 'ghost' | 'outlined' asChild?: boolean}
define function IconButton(props: IconButtonProps): ReactNode
Props
The IconButton
component accepts the following props:
Name | Default | Description |
---|---|---|
ariaLabel | "Icon Button" | The accessible label for the button. |
palette | action | The color palette of the button. |
usage | ghost | The style treatment of the button. |
size | lg | The size of the button. |
asChild | Render the Button as the child component. |
import { IconButton } from '@cerberus/react'
Usage
The IconButton API is similar to the Button, but with the addition of an ariaLabel
prop.
Customization
You can customize the button by utilizing the cx
function.
API
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { ariaLabel: string palette?: 'action' | 'secondaryAction' | 'danger' size?: 'sm' | 'lg' usage?: 'filled' | 'ghost' | 'outlined' asChild?: boolean}
define function IconButton(props: IconButtonProps): ReactNode
Props
The IconButton
component accepts the following props:
Name | Default | Description |
---|---|---|
ariaLabel | "Icon Button" | The accessible label for the button. |
palette | action | The color palette of the button. |
usage | ghost | The style treatment of the button. |
size | lg | The size of the button. |
asChild | Render the Button as the child component. |
import { IconButton } from '@cerberus/react'
Usage
The IconButton API is similar to the Button, but with the addition of an ariaLabel
prop.
Customization
You can customize the button by utilizing the cx
function.
API
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { ariaLabel: string palette?: 'action' | 'secondaryAction' | 'danger' size?: 'sm' | 'lg' usage?: 'filled' | 'ghost' | 'outlined' asChild?: boolean}
define function IconButton(props: IconButtonProps): ReactNode
Props
The IconButton
component accepts the following props:
Name | Default | Description |
---|---|---|
ariaLabel | "Icon Button" | The accessible label for the button. |
palette | action | The color palette of the button. |
usage | ghost | The style treatment of the button. |
size | lg | The size of the button. |
asChild | Render the Button as the child component. |