Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anchor-ui

Package Overview
Dependencies
Maintainers
2
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor-ui

React Component UI Kit

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-57.58%
Maintainers
2
Weekly downloads
 
Created
Source

Anchor UI

UI kit for chat engines with React

Usage

Install from npm

NPM

Components

<Avatar /> used for rendering a user's profile image.

Props:

NameTypeRequiredDefaultDescription
imageStringYesPath to user's profile image
styleObjectNo{}Override the styles of the root element

<Badge /> used for notification counter.

Props:

NameTypeRequiredDefaultDescription
contentString, Number, NodeYesContent to be rendered
styleObjectNo{}Override the styles of the root element

<Button />

Props:

NameTypeRequiredDefaultDescription
childrenElementYesButton content
iconButtonBooleanNofalseSwitches between icon-button and normal button
onClickFunctionYesButton onClick function
styleObjectNo{}Override the styles of the root element

<ChannelHeader /> a channel's header containing the channel name

Props:

NameTypeRequiredDefaultDescription
nameStringYesHeader content
styleObjectNo{}Override the styles of the root element
headerTextStyleObjectNo{}Override the styles of the text element

<EmptyState /> used for empty states

Props:

NameTypeRequiredDefaultDescription
headerTextStringYesHeader text
bodyTextStringYesBody text
buttonNodeNo{}Render a call to action button
styleObjectNo{}Override the styles of the root element
headerStyleObjectNo{}Override the styles of the header text
bodyStyleObjectNo{}Override the styles of the body text

<List />

Props:

NameTypeRequiredDefaultDescription
childrenNodeYesList content
styleObjectNo{}Override the styles of the root element

<ListItem />

Props:

NameTypeRequiredDefaultDescription
primaryTextStringYesThe list item's primary text
secondaryTextStringYesThe list item's secondary text
activeBooleanNofalseAdd active styles to ListItem
onClickFunctionYesClick function for the root element
styleObjectNo{}Override the styles of the root element
primaryTextStyleObjectNo{}Override the styles of the primaryText element
secondaryTextStyleObjectNo{}Override the styles of the secondaryText element

<Message />

Props:

NameTypeRequiredDefaultDescription
messageObjectYesMesage object containing: body, createdAt, username
message.bodyStringYesThe message's body text
message.createdAtString, DateYesTime when the message was created
message.usernameStringYesThe sender's username
timeFormatStringNo'HH:mm'The format in which to display message.createdAt
avatarStringNo''Path to the user's profile image, will render if supplied
myMessageBooleanNofalseFlag used to change message styles, set to true if the message belongs to the current user
styleObjectNo{}Override the styles of the root element
messageBodyStyleObjectNo{}Override the styles of the body element
messageHeaderStyleObjectNo{}Override the styles of the header element
messageTimeStyleObjectNo{}Override the styles of the time element

<MessageInput /> text input for message

Props:

NameTypeRequiredDefaultDescription
valueStringYesThe list items primary text
placeholderStringYesThe list items primary text
onChangeFunctionYesChange the input's value
sendMessageFunctionYesSend a message
styleObjectNo{}Override the styles of the root element
inputStyleObjectNo{}Override the styles of the input element
maxLengthNumberNo500The input's max length
leftButtonNodeNonullA button for the left side of the input

<ProfileCard /> used for rendering a user's profile details.

Props:

NameTypeRequiredDefaultDescription
usernameStringYesThe user's username
avatarStringYesPath to the user's profile image, will render if supplied
styleObjectNo{}Override the styles of the root element

Installation

src

Install node_modules used in ./src:

$ npm i

Compile ./src with Babel:

$ npm run compile

examples

Install node_modules used in ./examples:

$ cd examples && npm i

Development

src

To watch for changes in ./src run:

$ npm run watch

Babel will compile ./src on changes.

examples

To start the webpack server run:

$ cd examples && npm run start

Webpack wil compile on changes in ./examples/src.

License

This project is licensed under the terms of the MIT license.

Keywords

FAQs

Package last updated on 12 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc