An open API service indexing awesome lists of open source software.

https://github.com/thislooksfun/svelte-repo-card

A clean GitHub card embed, based on Tarptaeya/repo-card
https://github.com/thislooksfun/svelte-repo-card

Last synced: 5 months ago
JSON representation

A clean GitHub card embed, based on Tarptaeya/repo-card

Awesome Lists containing this project

README

          

# svelte-repo-card


semantic release
latest release
latest stable release
checks status
license


npm version
npm types
weekly npm downloads
npm dependents

A simple GitHub repo card component based on [Tarptaeya/repo-card](https://github.com/Tarptaeya/repo-card).

## Installation

```
npm i -D svelte-repo-card
```

## Usage

```svelte

import RepoCard from "svelte-repo-card";

```

It's that simple!

### Theming

If you want to control the appearance of the card you have three options:

1. Pass `"light"` or `"dark"` to the `theme` attribute to use the built-in light and dark themes.

```svelte

```

2. Pass a full custom object.

```svelte

// {...}

import type { Theme } from "svelte-repo-card";
const theme: Theme = {
// The color of the text.
text: "#586069",

// The color of the links.
link: "#0366d6",

// The background color.
background: "#ffffff",

// The border color.
border: "#e1e4e8",
};

```

3. Use the `--svc-*` css variables:

```css
:root {
--svc-text-primary: #586069;
--svc-text-link: #0366d6;
--svc-background: #ffffff;
--svc-border-color: #e1e4e8;
}
```

## Examples

1. ``: ![example screenshot](./docs/images/example-svelte-repo-card.png)
1. ``: ![example screenshot](./docs/images/example-swiftlysearch.png)
1. For a live demo you can check out [my website](https://thislooks.fun).