Stipop Docs | Documentation for SDK and API

Customizing Unified Component

Unified Component is where users can send stickers what you want among the stickers you downloaded and provides Store Component buttons for downloading stickers and search for stickers with search tags like happy, sad, what!, and more and find stickers they can send on chat. By adding a single line of code, you'll be able to add feature to your app, and customize the UI to make it better.

Before you begin

Make sure you went through all processes in Before You Begin to sign up for stipop dashborad and get API Key, which is reuiqred to complete development of the SDK.

Using Unified Component

apikey : Stipop API key for your app.
userId : Unique value for every user to distinguish unique users. The userId can be a string of any format.

React

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { UnifiedComponent } from 'stipop-react-sdk'

const App = () => {
  return (
    <UnifiedComponent 
      params={{
        apikey: 'apikey',
        userId: 'userId',
      }}
    />
  )
}

export default App

Next.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import dynamic from 'next/dynamic'

const UnifiedComponent = dynamic(
  () => import('stipop-react-sdk/dist/UnifiedComponent'),
  {
    ssr: false,
  })
  
const App = () => {
  return (
    <UnifiedComponent 
      params={{
        apikey: 'apikey',
        userId: 'userId',
      }}
    />
  )
}

export default App

Customizing Parameters

params
NameTypeDescriptionRequired
apikeystringStipop API Key for your app.
Visit developer dashboard for new API Key.
Required
userIdstringUnique value for every user to distinguish unique users.
The userId can be in any string format.
Important: Using same userId for multiple users is not allowed.
Required
langstringSpecify default language for regional stickers.
Use a 2-letter ISO 639-1 language code.
Default Value: en
Strongly Recommended
countryCodestringSpecify default country for local stickers.
Use a 2-letter ISO 3166-1 country code.
Default Value: US
Strongly Recommended
limitintThe maximum number of stickers per page.
Use pageNumber accordingly for optimized sticker view.
Default Value: 20 (max: 50)
Optional
pageNumberintSpecify pageNumber to show limit number of stickers per page.Optional
size
NameTypeDescriptionRequired
widthintSpecify unified component width.
Default Value: 360(px)
Optional
heightintSpecify unified component height.
Default Value: 300(px)
Optional
imgSizeintSpecify unified component img size.
Default Value: 60(%)
Optional
border
NameTypeDescriptionRequired
borderstringSpecify unified component border.
Default Value: 1px solid lightgray
Optional
radiusobjectSpecify unified component border radius.
Default Value:
{leftTop: 10, rightTop: 10, leftBottom: 10, rightBottom: 10}

all : This parameter preferentially applies the same value to all of the corners at once.
Optional
input
NameTypeDescriptionRequired
widthintSpecify unified component input width.
Default Value: 100(%)
Optional
heightintSpecify unified component input height.
Default Value: 32(px)
Optional
borderstringSpecify unified component input border.
Default Value: 2px solid lightgray
Optional
radiusintSpecify unified component input border radius.
Default Value: 50(px)
Optional
backgroundColorstringSpecify unified component input background color.
Default Value: #fff
Optional
colorstringSpecify unified component input text color.
Default Value: #000
Optional
focusstringSpecify unified component focused input border and search icon color.
Default Value: lightgray
Optional
searchstringSpecify unified component input search icon color.
Default Value: #d5d5d5
Optional
menu
NameTypeDescriptionRequired
heightintSpecify picker component menu height.
Default Value: 45(px)
Optional
backgroundColorstringSpecify picker component menu background color.
Default Value: #fff
Optional
bottomLinestringSpecify picker component menu bottom line border.
Default Value: 1px solid lightgray
Optional
selectedLinestringSpecify picker component selected menu item bottom line border.
Default Value: 2px solid black
Optional
listCntintSpecify picker component number of menu items.
Default Value: 6
Optional
arrowColorstringSpecify picker component menu arrow color.
Default Value: #000
Optional
imgSizeintSpecify picker component menu item image size(px).
Default Value: 60(%)
Optional
backgroundColor
TypeDescriptionRequired
stringSpecify unified component background color.
Default Value: #fff
Optional
column
TypeDescriptionRequired
intSpecify the number of columns in which the search result images are displayed.
Default Value: 4
Optional
scroll
TypeDescriptionRequired
booleanSpecify whether scroll is shown or not.
Default Value: true
Optional
scrollHover
TypeDescriptionRequired
stringSpecify the color of the scroll when mouse hovered over the scroll.
Default Value: #6d7072
Optional
stickerClick
TypeDescriptionRequired
functionReturn the sticker URL when the sticker is clicked.
- Function signature:
stickerClick={(url) => console.log(url)}
Optional
storeClick
TypeDescriptionRequired
functionReturn the boolean value when the store icon is clicked.
- Function signature:
storeClick={(click) => console.log(click)} // true
Optional
preview
TypeDescriptionRequired
booleanSpecify whether a preview image is shown when a sticker is clicked.
Default Value: false
Optional
loadingColor
TypeDescriptionRequired
stringSpecify the color of the loading spinner displayed while the sticker is loading.
Default Value: #ff4500
Optional
shadow
TypeDescriptionRequired
stringSpecify unified component shadow effect.
Default Value: 0 10px 20px 6px rgba(0, 0, 0, 0.1)
Optional
We’re here to help. Contact us.