https://github.com/httpcats/http-cat-element
:cat: Web Component for embedding HTTP Cats images
https://github.com/httpcats/http-cat-element
Last synced: about 1 month ago
JSON representation
:cat: Web Component for embedding HTTP Cats images
- Host: GitHub
- URL: https://github.com/httpcats/http-cat-element
- Owner: httpcats
- License: mit
- Created: 2014-06-30T20:34:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-30T22:52:53.000Z (11 months ago)
- Last Synced: 2025-05-27T13:19:26.010Z (9 months ago)
- Language: JavaScript
- Homepage: https://httpcats.github.io/http-cat-element/
- Size: 169 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-cat

This is a web component for embedding images from [HTTP Cats](https://http.cat).
Here's a [live demo](http://httpcats.github.io/http-cat-element).
## Install
```shell
npm install @http.cat/http-cat-element
```
## Import
If installed via NPM:
```js
import "@http.cat/http-cat-element";
```
Or just import the component file in your HTML:
```html
```
## Usage
To use it just add the following markup to your HTML:
```html
```
### Attributes
- `status`: change it so that the image matches the corresponding HTTP status code
This component supports all `img` element attributes.
## Why didn't you extend the `img` native element instead?
Safari does not currently support custom elements that extend native elements. Therefore, an autonomous custom element is used to ensure maximum browser compatibility.
## LICENSE
MIT License