Kinf docs / Using pieces in code

Last updated:

Using pieces in code

How to put what you download into a website or app: icons as ready components, logos and pictures as files, fonts with @font-face, sounds and clips with plain HTML. Every piece's page can also hand the job to an AI agent.

Icons as code (Link to this section)

An icon's page lets you choose its colour, size and stroke, then copy it as ready code. Pick the format in the Code row and press copy. A copy counts as one download, like a file.

FormatWhat you get
SVGThe SVG markup itself, to paste into HTML or a design tool.
React (JSX)A typed component that passes its props (className, aria-label …) on to the SVG.
VueA single-file component with the SVG as its template.
SvelteA Svelte 5 component that passes the rest of its props on to the SVG.
React NativeA component built on react-native-svg, with a size prop.
FlutterA widget built on flutter_svg, with a size parameter.
CSSA class that draws the icon as a mask in the colour of the text around it.
HTML imgAn image tag with the SVG inside its address; no file needed.
React
import { ArrowRightIcon } from "./icons/ArrowRightIcon";

export function Next() {
  return (
    <button>
      Next <ArrowRightIcon width={20} height={20} aria-hidden />
    </button>
  );
}

Logos and pictures as files (Link to this section)

Logos come as SVG, photos as WebP, 3D pieces and stickers as PNG. Put the file in the folder your framework serves as it is (public/ in Next.js and Vite, static/ in SvelteKit and Hugo) and refer to it by its path.

HTML
<img src="/logos/github.svg" alt="GitHub" width="96" height="96">

Give every picture its width and height, so the page does not jump while it loads, and an alt text that names it. A logo's alt text is the brand's name.

Fonts on the web (Link to this section)

Fonts come with their files and the OFL licence text. Keep the licence file next to the fonts, then load them with @font-face, using the name of the file you downloaded:

CSS
@font-face {
  font-family: "My Font";
  src: url("/fonts/my-font.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

body {
  font-family: "My Font", system-ui, sans-serif;
}

For a .ttf file write format("truetype"), for an .otf file format("opentype").

Sounds and clips (Link to this section)

Music and sound effects come as audio files, clips as video files. The browser's own elements play them without any library:

HTML
<audio src="/sounds/click.mp3" preload="none"></audio>

<video src="/clips/waves.mp4" autoplay muted loop playsinline width="1280" height="720"></video>

Browsers only start a video on their own when it is muted. Load long sounds only when they are needed.

Credits in the project (Link to this section)

When a piece's licence asks for credit or for its notice to be kept, keep a CREDITS.md file in the project. Each piece's page has the line ready to copy, and an AI agent writes the whole file with assets_credits.

CREDITS.md
# Credits

- GitHub logo: Simple Icons, CC0 1.0
- Arrow right icon: Phosphor Icons, MIT

Handing it to an agent (Link to this section)

Every piece's page has Copy prompt for your AI agent. It copies a short prompt with the piece's id, the tool to call and what its licence asks. Paste it into Claude Code, Cursor or another agent connected to Kinf. Connect an agent

Did not find the answer? Write to us.

↑ Back to top

Type a word: licence, logo, MCP, PNG… ↑ ↓ to move, Enter to open.