Icon
Lucide icons with size, color and accessible labels.
Text and Markdown example
1<Icon icon={Check} label="Completed" size={24} color="#16a34a" />How to use it
Import an icon from lucide-react and pass it as icon={Check}. On native, use lucide-react-native and Icon from @kivora/native inside KivoraProvider. size, color, strokeWidth and label work on both platforms. Omit label when text accompanies the icon; add it when the icon conveys information on its own. On web you can also use className.
Import
1import { Icon } from "@kivora/nextjs";Interactive examples run inside a component with "use client". The playground's Copy button includes the imports needed for the current example.
API reference 0.2.0
Types from the installed published version, including component properties and common HTML attributes. “Optional” does not imply a default value; omitting a property lets the component decide.
| Property | Type | Description |
|---|---|---|
iconRequired | LucideIcon | Lucide component to render, imported from lucide-react. |
absoluteStrokeWidth | boolean | Configures absoluteStrokeWidth. The type describes the supported values and structure. |
aria-label | string | Accessible name of the control. |
children | ReactNode | Content or child elements of the component. |
className | string | Additional CSS classes to customize the element. |
id | string | Element identifier; associates labels and descriptions. |
label | string | Text or accessible label. |
max | string | number | Maximum allowed value. |
min | string | number | Minimum allowed value. |
name | string | Name used to identify the control in forms. |
onChange | ChangeEventHandler<SVGSVGElement, Element> | Change event. Check the type: some controls return an object, others a DOM event. |
onClick | MouseEventHandler<SVGSVGElement> | Action performed when the element is activated. |
onSubmit | SubmitEventHandler<SVGSVGElement> | Form submission event. |
role | AriaRole | Semantic role of the element. Keep the default role unless a change is justified. |
size | string | number | Visual size of the component. |
style | CSSProperties | React inline styles. |
tabIndex | number | Keyboard focus order and availability. |
type | string | Operation type or mode; values depend on the component. |
TypeScript definition
Review each component's properties and published declaration. Native and accessibility attributes are inherited from the element specified by its type.
Icon18 properties
1Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>