# Using the Demos

Canonical page: https://www.adaptabletools.com/docs/documentation-demo-list

- This Documentation includes many small Demos
- Most Demos contain the same small data set that show the a list of popular JavaScript Frameworks
- The Demos can be set to run in 3 flavours:
  - using AdapTable Vanilla
  - using AdapTable Rect
  - using AdapTable Angular
  - using AdapTable Vue
- Each Demo highlights a particular Module or piece of functionality with options to:
  - Switch between code view and grid view
  - Open the Demo in Full Screen
  - Fork the Demo in Sandbox to make changes and run independently
  - Reset to remove any changes made to the Demo
- Most Demos also include:
  - Description and explanation of what the Demo does
  - Key code snippets of interest
  - Suggestions to try things out

The AdapTable documentation is liberally sprinkled with hundreds of Demos.

Every Demo illustrates a different piece of functionality or use case.

Each Demo is a full featured AdapTable (and AG Grid) instance that uses [Sandpack](https://codesandbox.io/blog/sandpack-announcement).

## Contents of the Demos

The Demos are designed to be as instructive, educational and helpful as possible.

Accordingly each Demo contains these features:

- ability between to toggle between showing the **Code** and seeing the **AdapTable** instance
- option to view the Demo in **Full Screen**

In full screen the Code and the AdapTable instance can be viewed side be side

- **Reset** button to undo any changes made and revert to the original version of the Demo
- **Fork** button to run the Demo in *Codesandbox* 

- Running a Demo in CodeSandbox is a good way to see how the particular Framework builds the full Demo
  - It also allows you easily to change the Initial Adaptable State or Adaptable Options and view the results

- **Description** summarising what the Demo is designed to illustrate
- expandable **Show More** button which displays the most important snippet of code used
- **Try It Out** suggestion giving tips for something the user might want to try
### Code View
Code View provides the most important code files that were used to create the Demo.
It typically includes:
- `adaptableOptions.ts` - the [Adaptable Options](https://www.adaptabletools.com/docs/technical-reference-adaptable-options/index.md) used in the Demo (including any [Initial Adaptable State](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-initial-state/index.md))
- `gridOptions.ts` - the [AG Grid Grid Options](https://www.ag-grid.com/javascript-data-grid/grid-options/) file used
- `columnDefs.ts` - the [AG Grid Column Definitions](https://www.ag-grid.com/javascript-data-grid/column-definitions/) provided to Grid Options
- `agGridModules.ts` - the [AG Grid Modules](https://www.adaptabletools.com/docs/getting-started-aggrid-modules/index.md) used in the Demo (typically the full set that AdapTable requires)
and when required (i.e. when the Event has been subscribed):
- `onAdaptableReady.ts` - the code provided in the [Adaptable Ready Event](https://www.adaptabletools.com/docs/getting-started-adaptable-ready/index.md) for the Demo

- In the real world you are unlikely to create a file just to listen to the Adaptable Ready Event
- It's provided here to minimise the code provided, and only display what is relevant to the particular Demo

## Setting the Framework
AdapTable comes in 4 versions, and each of these can be used to power the Demos:
- Vanilla (TypeScript)
- [AdapTable React](https://www.adaptabletools.com/docs/index.md)
- [AdapTable Angular](https://www.adaptabletools.com/docs/index.md)
- [AdapTable Vue](https://www.adaptabletools.com/docs/index.md)

We show the Framework being used in the top left corner of each Demo Sandpack

By default, all Demos will be written using AdapTable TypeScript.
But this can be changed by clicking the required Framework button in the top right of each page.

- In practice there is not much difference between the Frameworks in the Demos when they are displayed inside Help
- However forking a Demo to open it in Codesandbox, shows all the code provided in a fully Framework-specific way

- Some Demos can **only** be displayed in a particular Framework and the global Framework setting is ignored
- For instance the Demos which create React or Angular Components

### The Data Set

The overwhelming majority of the Demos contain the same Data Set.

It contains 25 rows, each showing the Github record of a different JavaScript framework.

A small Data Set allows each example to focus on a separate piece of functionality, rather than overall performance

- There are a few Demos in the Documentation which do contain much bigger Data Sets 
- One good example is the [Adaptable Performance Demo](https://www.adaptabletools.com/docs/dev-guide-support-adaptable-performance/index.md) which contains 100,000 rows
- Another are the [Server-Side Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-server-overview/index.md) and [Viewport Row Model](https://www.adaptabletools.com/docs/dev-guide-row-models-viewport/index.md) Demos which both use infinite data

## Demo List

This is the full list of Demos available in the Documentation.

Click to open the Demo of your choice.
