Skip to content

Latest commit

 

History

History
 
 

@fluid-example/badge

Badge is a Fluid component that allows users to create an in-line badge within a document to represent the status of the overall document or a section of it.

Badge UI

Getting Started

If you want to run this example follow the following steps:

  1. Run npm install from the FluidFramework root directory
  2. Navigate to this directory
  3. Run npm run start

Custom Status

Badge includes four preset statuses: Drafting, Reviewing, Complete, and Archived.

You can also set a custom status with any text or color.

Color picker and custom status UI

History

The history of the Badge is also shown on hover, so users can see how the status has evolved over time.

Status history UI

Data model

Badge uses the following distributed data structures:

  • SharedDirectory - root
  • SharedMap - stores the status options for the Badge
  • SharedCell - represents the Badge's current state
  • SharedObjectSequence - stores the history of status changes