Icon
Icons are small visual elements, like symbols, that represent certain functions, features, or types of content within a user interface.
import {Icon} from "@qualcomm-ui/react/icon"Overview
QUI components use icons from Lucide, an open-source fork of Feather Icons.
Many components like the Button and Icon Button have built-in support for Lucide Icons.
Examples
Showcase
Qualcomm
<Icon icon={ExternalLink} size="lg" />
<Icon icon={Search} size="lg" />
<Icon icon={Eye} size="lg" />
Sizes
Size can be customized using the size input. There are five available values: xs, sm, md, lg, xl. Should you need more control over the rendered size, supply a number instead which will be converted to pixels.
Qualcomm
import type {ReactNode} from "react"
import {ExternalLink} from "lucide-react"
import {Icon} from "@qualcomm-ui/react/icon"
export function IconSizesDemo(): ReactNode {
return (
<div className="q-foreground-1-primary grid justify-center gap-4">
<div className="flex items-end justify-center gap-4">
<Icon icon={ExternalLink} size="xs" />
<Icon icon={ExternalLink} size="sm" />
<Icon icon={ExternalLink} size="md" />
<Icon icon={ExternalLink} size="lg" />
<Icon icon={ExternalLink} size="xl" />
</div>
<div className="flex items-center justify-center gap-4">
<Icon icon={ExternalLink} size={32} />
<Icon icon={ExternalLink} size={42} />
</div>
</div>
)
}API
<Icon>
The properties of the <svg> element also apply.
| Attribute / Property | Value |
|---|---|
className | 'qui-icon__root' |
data-size | | string |
style |
<svg>element.