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.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-3.45%
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
styleObjectOverride the styles of the root element

<Badge /> used for notification counter.

Props:

NameTypeRequiredDefaultDescription
contentString, Number, NodeYesContent to be rendered
styleObjectOverride the styles of the root element

<Button />

Props:

NameTypeRequiredDefaultDescription
childrenElementYesButton content
styleObjectOverride the styles of the root element

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

Props:

NameTypeRequiredDefaultDescription
nameStringYesButton content
styleObjectOverride the styles of the root element
headerTextStyleObjectOverride the styles of the text element

<List />

Props:

NameTypeRequiredDefaultDescription
childrenNodeYesList content
styleObjectOverride the styles of the root element

<ListItem />

Props:

NameTypeRequiredDefaultDescription
primaryTextStringYesThe list item's primary text
secondaryTextStringYesThe list item's secondary text
activeBooleanAdd active styles to ListItem
onClickFunctionYesClick function for the root element
styleObjectOverride the styles of the root element
primaryTextStyleObjectOverride the styles of the primaryText element
secondaryTextStyleObjectOverride 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
timeFormatString'HH:mm'The format in which to display message.createdAt
avatarStringPath to the user's profile image, will render if supplied
myMessageBooleanfalseFlag used to change message styles, set to true if the message belongs to the current user
styleObjectOverride the styles of the root element
messageBodyStyleObjectOverride the styles of the body element
messageHeaderStyleObjectOverride the styles of the header element
messageTimeStyleObjectOverride 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
styleObjectOverride the styles of the root element
inputStyleObjectOverride the styles of the input element

<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
styleObjectOverride 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 10 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