ShareActions. Reader-initiated native, copy, email, and configured social sharing actions.
- Engagement
- Interactive
- Stability · Initial
- ::postkit-share-actions
Usage.
<ShareActions
url="https://postkit.org/components"
title="Postkit component library"
text="Publishing components that travel well."
services='["copy","email"]'
label="Share this guide"
/>Props. Always in step with the code.
| Prop | Type | Default | Description |
|---|---|---|---|
| urlRequired | string | None | The canonical URL to share. |
| title | string | None | The title included with the share. |
| text | string | None | Supporting text included with the share. |
| services | JSON string | None | A JSON array of configured service identifiers. |
| label | string | "Share this post" | The accessible heading for the actions. |
| layout | "inline" | "buttons" | "buttons" | How share actions are arranged. |
| Appearance | |||
| size | "sm" | "md" | "lg" | "md" | The component density and type scale. |
| variant | "outline" | "subtle" | "plain" | "subtle" | The component visual treatment. |
Every component also takes unstyled and the part-styling props. Change a default for your whole site with defaults in createPostkit. Part styles
Anatomy. Every part is yours to restyle.
Every part
- root
- label
- actions
- action
- icon
- status
Renderers. One component, everywhere you publish.
- Headless @postkit/reactSupported
- Chakra @postkit/chakraSupported
- Email @postkit/emailLeft out
- Astro @postkit/astroHydrated
- Web components @postkit/elementsPlanned