Components
Classes
Types
No results found.
If this is a bug, please report it.
Scroll
Open
LiftKit's Image component wraps around the Next.js Image component and adds a few convenience props for things like aspect-ratio.
<Image
src="/testimage.png"
alt={size}
lk-image-width={size}
lk-image-height={size}
className="shadow5"
/>
Note: Other React frameworks are not currently supported, but they might still work. Try at your own risk.
Method | Instructions |
---|---|
LiftKit CLI |
From any Next.js project, run the following command in your terminal.
npm run add image
content_copy
|
Github | open_in_new View on Github |
Method | Instructions |
---|---|
Webflow | open_in_new Clone from Made In Webflow |
Figma | open_in_new Clone from Figma Community |
Props unique to this component.
Name | Required | Type | Description | Default Val |
---|---|---|---|---|
aspect | no | "auto" | "1/1" | "2.39/1" | "2/1" | "16/9" | "3/2" | "4/3" | "5/4" | "1/2.39" | "1/2" | "9/16" | "4/5" | Sets the aspect ratio of the image | undefined |
borderRadius | no | LkSizeUnit | "none" | "zero" | Controls the border radius applied to the image | undefined |
height | no | LkSizeUnit | "auto" | Specifies the height of the image | undefined |
objectFit | no | CSSProperties["objectFit"] | Sets how the image should fit its container | undefined |
width | no | LkSizeUnit | "auto" | Specifies the width of the image | undefined |
Props with globally-defined behavior that are used in multiple components.
Common Props | Status |
---|---|
{children} | Not Supported |
Native HTML attributes | Supported |