Buckets:
149 GB
1,602,886 files
Updated 32 minutes ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| README.html | 19.8 kB xet | c3a15243 | |
| README.md | 1.14 kB xet | dffdc500 |
🤗 Hugging Face Space Header
A Typescript powered wrapper for the Space mini_header feature.
Install
pnpm add @huggingface/space-header
npm add @huggingface/space-header
yarn add @huggingface/space-header
Deno
// esm.sh
import { init } from "https://esm.sh/@huggingface/space-header"
// or npm:
import { init } from "npm:@huggingface/space-header"
Initialize
import { init } from "@huggingface/space-header";
// ...
init(":user/:spaceId");
// init("enzostvs/lora-studio") for example
âť—Important note: The init method must be called on the client side.
Usage
Uses the target option to inject the space-header into another DOM element
const app = document.getElementById("app");
// ...
init(":user/:spaceId", {
target: app
});
If you already have the space data, you can also pass it as a parameter to avoid a fetch
init(space);
// space = {
// id: string;
// likes: number;
// author: string;
// }
- Total size
- 149 GB
- Files
- 1,602,886
- Last updated
- Aug 30
- Pre-warmed CDN
- US EU US EU