0.2.3 • Published 9 months ago
bsky-embed v0.2.3
bsky-embed
A web-component to easily embed a bluesky feed.
See it in action on CodePen.
<script type="module" src="https://cdn.jsdelivr.net/npm/bsky-embed/dist/bsky-embed.es.js" async></script>
<bsky-embed
username="vincentwill.com"
mode="dark"
limit="5"
>
</bsky-embed>Installation
Option 1. via CDN
<script type="module" src="https://cdn.jsdelivr.net/npm/bsky-embed/dist/bsky-embed.es.js" async></script>Option 2. via npm / yarn etc.
Install via CLI
npm i bsky-embed --saveImport in any framework using:
import "bsky-embed/dist/bsky-embed.es.js"Usage
<bsky-embed
username="vincentwill.com"
feed="at://...(decide between username, feed, or search)"
search="#BuildInPublic (decide between username, feed, and search)"
mode="dark"
limit="5"
link-target="_blank"
link-image="true"
load-more="true"
disable-styles="false"
custom-styles=".border-slate-300 { border-color: red; }"
date-format='{"type":"absolute","locale":"de-DE","options":{"weekday":"long","year":"numeric","month":"long","day":"numeric"}}'
>
</bsky-embed>Options
Required (at least one of these options)
| Option | Value | Default Value |
|---|---|---|
username | User handle | - |
feed | Feed ID * | - |
search | Search term (eg. hashtags) | - |
Optional
| Option | Value | Default Value |
|---|---|---|
limit | Positive integer | 10 |
mode | "dark" or "" | - |
link-target | "_self", "_blank", "_parent", "_top" | "_self" |
link-image | "true" or "false" | "false" |
load-more | "true" or "false" | "false" |
disable-styles | "true" or "false" | "false" |
custom-styles | String representing custom CSS styles | - |
date-format | JSON String with type, locale & options (see Issue#35) | '{"type":"relative"}' |
Run Locally
The project is written in Solid.js.
Clone the repository and Run
npm iTo start the dev server use:
npm run devTo build the web component use
npm run buildThe JavaScript file for the web component will be rendered into ./dist/. You can test the web component with the test.html file.
Contributors
License
0.2.3
9 months ago
0.2.2
10 months ago
0.2.1
11 months ago
0.2.0
11 months ago
0.1.9
11 months ago
0.1.9-b
11 months ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago


