Skip to content

Commit 3ece262

Browse files
SEO (#1)
* canonical * robots * sitemap * llms * description should be longer * make build work * Update site/src/config.ts Co-authored-by: Marc Bouchenoire <bouchenoire.marc@gmail.com> --------- Co-authored-by: Marc Bouchenoire <bouchenoire.marc@gmail.com>
1 parent 41f69f6 commit 3ece262

File tree

5 files changed

+102
-11
lines changed

5 files changed

+102
-11
lines changed

site/public/llms.txt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Frimousse
2+
3+
A lightweight, unstyled, and composable emoji picker for React.
4+
5+
- ⚡️ **Lightweight and fast**: Dependency-free, tree-shakable, and virtualized with minimal re-renders
6+
- 🎨 **Unstyled and composable**: Bring your own styles and compose parts as you want
7+
- 🔄 **Always up-to-date**: Latest emoji data is fetched when needed and cached locally
8+
- 🔣 **No � symbols**: Unsupported emojis are automatically hidden
9+
- ♿️ **Accessible**: Keyboard navigable and screen reader-friendly
10+
11+
## Installation
12+
13+
```bash
14+
npm i frimousse
15+
```
16+
17+
If you are using [shadcn/ui](https://ui.shadcn.com/), you can also install it as a pre-built component via the [shadcn CLI](https://ui.shadcn.com/docs/cli).
18+
19+
```bash
20+
npx shadcn@latest add https://frimousse.liveblocks.io/r/emoji-picker
21+
```
22+
23+
Learn more in the [shadcn/ui](#shadcnui) section.
24+
25+
## Usage
26+
27+
Import the `EmojiPicker` parts and create your own component by composing them.
28+
29+
```tsx
30+
import { EmojiPicker } from "frimousse";
31+
32+
export function MyEmojiPicker() {
33+
return (
34+
<EmojiPicker.Root>
35+
<EmojiPicker.Search />
36+
<EmojiPicker.Viewport>
37+
<EmojiPicker.Loading>Loading…</EmojiPicker.Loading>
38+
<EmojiPicker.Empty>No emoji found.</EmojiPicker.Empty>
39+
<EmojiPicker.List />
40+
</EmojiPicker.Viewport>
41+
</EmojiPicker.Root>
42+
);
43+
}
44+
```
45+
46+
Apart from a few sizing and overflow defaults, the parts don’t have any styles out-of-the-box. Being composable, you can bring your own styles and apply them however you want: [Tailwind CSS](https://tailwindcss.com/), CSS-in-JS, vanilla CSS via inline styles, classes, or by targeting the `[frimousse-*]` attributes present on each part.
47+
48+
You might want to use it in a popover rather than on its own. Frimousse only provides the emoji picker itself so if you don’t have a popover component in your app yet, there are several libraries available: [Radix UI](https://www.radix-ui.com/primitives/docs/components/popover), [Base UI](https://base-ui.com/react/components/popover), [Headless UI](https://headlessui.com/react/popover), and [React Aria](https://react-spectrum.adobe.com/react-aria/Popover.html), to name a few.
49+
50+
### shadcn/ui
51+
52+
If you are using [shadcn/ui](https://ui.shadcn.com/), you can install a pre-built version which integrates with the existing shadcn/ui variables via the [shadcn CLI](https://ui.shadcn.com/docs/cli).
53+
54+
```bash
55+
npx shadcn@latest add https://frimousse.liveblocks.io/r/emoji-picker
56+
```
57+
58+
It can be composed and combined with other shadcn/ui components like [Popover](https://ui.shadcn.com/docs/components/popover).
59+
60+
## Documentation
61+
62+
Find the full documentation and examples on [frimousse.liveblocks.io](https://frimousse.liveblocks.io).
63+
64+
## Miscellaneous
65+
66+
The name [“frimousse”](https://en.wiktionary.org/wiki/frimousse) means “little face” in French, and it can also refer to smileys and emoticons.
67+
68+
The emoji picker component was originally created for the [Liveblocks Comments](https://liveblocks.io/comments) default components, within [`@liveblocks/react-ui`](https://github.com/liveblocks/liveblocks/tree/main/packages/liveblocks-react-ui).
69+
70+
## Credits
71+
72+
The emoji data is based on [Emojibase](https://emojibase.dev/).

site/src/app/layout.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { PropsWithChildren } from "react";
88
import { Toaster } from "sonner";
99
import { DynamicMaximumScaleMeta } from "./layout.client";
1010
import "./styles.css";
11+
import { config } from "@/config";
1112

1213
const inter = localFont({
1314
src: "./inter-variable.woff2",
@@ -19,23 +20,15 @@ const jetbrainsMono = JetBrains_Mono({
1920
variable: "--font-jetbrains-mono",
2021
});
2122

22-
const config = {
23-
name: "Frimousse — An emoji picker for React",
24-
url: "https://frimousse.liveblocks.io",
25-
description:
26-
"A lightweight, unstyled, and composable emoji picker for React.",
27-
links: {
28-
twitter: "https://x.com/liveblocks",
29-
github: "https://github.com/liveblocks/frimousse",
30-
},
31-
} as const;
32-
3323
export const metadata: Metadata = {
3424
title: {
3525
default: config.name,
3626
template: `%s — ${config.name}`,
3727
},
3828
metadataBase: new URL(config.url),
29+
alternates: {
30+
canonical: "/",
31+
},
3932
description: config.description,
4033
keywords: [
4134
"emoji",

site/src/app/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Allow: /

site/src/app/sitemap.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { MetadataRoute } from "next";
2+
import { config } from "@/config";
3+
4+
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
5+
"use cache";
6+
return [
7+
{
8+
url: config.url,
9+
lastModified: new Date(),
10+
changeFrequency: "monthly",
11+
priority: 1,
12+
},
13+
];
14+
}

site/src/config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export const config = {
2+
name: "Frimousse — An emoji picker for React",
3+
url: "https://frimousse.liveblocks.io",
4+
description:
5+
"Frimousse is an open-source, lightweight, unstyled, and composable emoji picker for React—originally created for Liveblocks Comments. Styles can be applied with CSS, Tailwind CSS, CSS-in-JS, and more.",
6+
links: {
7+
twitter: "https://x.com/liveblocks",
8+
github: "https://github.com/liveblocks/frimousse",
9+
},
10+
} as const;

0 commit comments

Comments
 (0)