Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-types/image

Package Overview
Dependencies
Maintainers
0
Versions
848
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-types/image - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0-nightly-086ad3115-240911

12

package.json
{
"name": "@react-types/image",
"version": "3.0.0-alpha.1",
"version": "3.0.0-nightly-086ad3115-240911",
"description": "Spectrum UI components in React",

@@ -9,9 +9,9 @@ "license": "Apache-2.0",

"type": "git",
"url": "https://github.com/adobe-private/react-spectrum-v3"
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-types/shared": "^3.0.0-rc.2"
"@react-types/shared": "^3.0.0-nightly-086ad3115-240911"
},
"peerDependencies": {
"react": "^16.8.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
},

@@ -21,3 +21,3 @@ "publishConfig": {

},
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410"
}
"stableVersion": "3.4.3"
}
# @react-types/image
This package is part of [react-spectrum](https://github.com/adobe-private/react-spectrum-v3). See the repo for more details.
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.

@@ -14,10 +14,25 @@ /*

import {DOMProps, StyleProps} from '@react-types/shared';
import {ReactEventHandler} from 'react';
export interface ImageProps {
loaded?: boolean, // not real, just makes ts happy for now
isPlaceholder?: boolean, // same thing
/**
* The URL of the image.
*/
src: string,
/**
* Text description of the image.
*/
alt?: string,
/**
* Sets the Image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) style.
*/
objectFit?: any, // move to styleProps for images and type better
src?: string,
decorative?: boolean,
alt?: string,
/**
* Called if an error occurs while loading or rendering an image, see [Image loading errors](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors).
*/
onError?: ReactEventHandler<HTMLImageElement>,
/**
* Called when the image has successfully loaded, see [load event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event).
*/
onLoad?: ReactEventHandler<HTMLImageElement>
}

@@ -28,5 +43,5 @@

* A slot to place the image in.
* @default "image"
* @default 'image'
*/
slot?: string
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc