strapi-plugin-typed-link
v0.1.0
Published
Reusable typed link component for Strapi v5 — supports website, social platforms, email, phone, and more
Maintainers
Readme
strapi-plugin-typed-link
A reusable typed link component for Strapi v5. Provides a typed.link component with a platform/type selector — website, Instagram, Facebook, Discord, YouTube, Twitter/X, LinkedIn, TikTok, email, phone, and more.
Installation
npm install strapi-plugin-typed-link
# or
yarn add strapi-plugin-typed-linkEnable the plugin in config/plugins.ts:
export default () => ({
'typed-link': {
enabled: true,
},
});Rebuild Strapi:
npm run build
npm run developUsage
Once installed, the typed.link component is available in any content type schema:
{
"attributes": {
"liens": {
"type": "component",
"repeatable": true,
"component": "typed.link"
}
}
}Component Schema
The typed.link component provides the following fields:
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| type | Enumeration | Yes | website | Link platform type |
| label | String (max 100) | Yes | — | Display label |
| url | String (max 500) | Yes | — | URL, email, or phone number |
| nouvelOnglet | Boolean | No | true | Open in new tab |
Available Types
website · instagram · facebook · discord · youtube · twitter · linkedin · tiktok · email · phone · other
Frontend TypeScript Types
type TypedLinkType =
| 'website' | 'instagram' | 'facebook' | 'discord'
| 'youtube' | 'twitter' | 'linkedin' | 'tiktok'
| 'email' | 'phone' | 'other';
interface TypedLink {
id: number;
type: TypedLinkType;
label: string;
url: string;
nouvelOnglet?: boolean;
}Compatibility
- Strapi v5.x (not compatible with v4)
License
MIT
