Skip to content
FoundationsInteractive playground

Icon

Lucide icons with size, color and accessible labels.

Preparing the playground…
Text and Markdown example
Icon · Example
1<Icon icon={Check} label="Completed" size={24} color="#16a34a" />
Read documentation in Markdown

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

React / Next.js
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.

PropertyTypeDescription
iconRequiredLucideIconLucide component to render, imported from lucide-react.
absoluteStrokeWidthbooleanConfigures absoluteStrokeWidth. The type describes the supported values and structure.
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
idstringElement identifier; associates labels and descriptions.
labelstringText or accessible label.
maxstring | numberMaximum allowed value.
minstring | numberMinimum allowed value.
namestringName used to identify the control in forms.
onChangeChangeEventHandler<SVGSVGElement, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<SVGSVGElement>Action performed when the element is activated.
onSubmitSubmitEventHandler<SVGSVGElement>Form submission event.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
sizestring | numberVisual size of the component.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
typestringOperation 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
Icon · TypeScript
1Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>
API generated from @kivora/nextjs 0.2.0View package