π Twitter
π¨βπ» Code
import {
TwitterShareButton,
TwitterIcon,
} from 'next-share'
<TwitterShareButton
url={'https://github.com/next-share'}
title={'next-share is a social share buttons for your next React apps.'}
>
<TwitterIcon size={32} round />
</TwitterShareButton>
π₯° Generate
π TwitterShareButton Props
Props | Type | Default | Description | Required |
---|---|---|---|---|
children | node | React component, HTML element or string. | β | |
url | string | The URL of the shared page. | β | |
title | string | The title of the shared page. | β | |
via | string | β | ||
hashtags | array | β | ||
related | array | β | ||
windowWidth | number | 550 | Opened window width. | β |
windowHeight | number | 400 | Opened window height. | β |
blankTarget | boolean | false | Open share window in a new tab if set to true . | β |
π TwitterIcon Props
Props | Type | Default | Description | Required |
---|---|---|---|---|
size | number | Icon size in pixels. | β | |
round | boolean | Show round or rectangle. | β | |
borderRadius | number | Set rounded corners if using round icon. | β | |
bgStyle | object | Customize background style. | β | |
iconFillColor | string | white | Customize icon fill color. | β |
blankTarget | boolean | false | Open share window in a new tab if set to true . | β |