# Spectrum Component Schemas

An NPM package of JSON Schema for Spectrum components. Used in the table of options on the Spectrum Design System website (example).

| **Property**        | **Values**                              | **Default value** |
| ------------------- | --------------------------------------- | ----------------- |
| label               | text                                    | -                 |
| hide label          | yes / no                                | no                |
| icon                | icon / nothing                          | nothing           |
| size                | s / m / l / xl                          | m                 |
| is quiet            | yes / no                                | no                |
| is selected         | yes / no                                | no                |
| is emphasized       | yes / no                                | no                |
| static color        | white / black                           | none              |
| selected text color | hex value                               | #000000           |
| has hold icon       | yes / no                                | no                |
| is disabled         | yes / no                                | no                |
| state               | default / hover / down / keyboard focus | default           |

## Helper functions

- `schemaFileNames`
- `getSchemaFile()`
- `getAllSchemas()`
- `getAllSlugs()`

## Project file structure

```
├── schemas
│   ├── components
│   │   └── // component json files
│   ├── types
│   │   └── // shared types like hex-color
├── test
│   └── // tests
├── CHANGELOG.md // generated by changeset
├── index.js // helpful functions for fetching the schema file data
├── moon.yml // config file for moon monorepo task management
├── package.json
└── README.md // this file!
```
