Metadata-Version: 2.4
Name: ssb-dash-components
Version: 0.11.2
Summary: Dash Component library for SSB
License: MIT
License-File: LICENSE
Author: Miles Mason Winther
Author-email: 42948872+mmwinther@users.noreply.github.com
Requires-Python: >=3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: dash (>=2.15.0)
Requires-Dist: pyopenssl (==26.0.0)
Description-Content-Type: text/markdown

# SSB Dash Components

_The [SSB Component Library](https://design.ssb.no/), available for Dash!_

## Components

| Component              | Available for Dash? |
| ---------------------- | ------------------- |
| Accordion              | :white_check_mark:  |
| Breadcrumb             |                     |
| Button                 | :white_check_mark:  |
| Cards                  |                     |
| Checkbox               | :white_check_mark:  |
| Dialog                 | :white_check_mark:  |
| Divider                |                     |
| Dropdown               | :white_check_mark:  |
| DropdownMultiple       | :white_check_mark:  |
| Fact Box               |                     |
| Footer                 |                     |
| Form Error             |                     |
| Glossary               | :white_check_mark:  |
| Graphs                 |                     |
| Header                 | :white_check_mark:  |
| Input                  | :white_check_mark:  |
| Key Figures            |                     |
| Links                  | :white_check_mark:  |
| Map                    |                     |
| Pagination             |                     |
| Paragraph              | :white_check_mark:  |
| Quote and Highlighting |                     |
| Radio Buttons          |                     |
| Responsive media       |                     |
| Reference              |                     |
| Search                 |                     |
| Site navigation        |                     |
| Sticky menu            |                     |
| Table                  |                     |
| Tabs                   | :white_check_mark:  |
| Tags                   |                     |
| Title                  | :white_check_mark:  |
| Warnings and errors    | :white_check_mark:  |

## Usage

We demonstrate the usage of components in the usage files in this repo.

These can be run up as a Dash server and then viewed in a browser e.g.

1. Run `poetry run python usage.py`
1. Visit <http://127.0.0.1:8050/> in a browser
1. View and try out the rendered components: ![](./images/usage-example.png)

The usage files are divided up to avoid being too cluttered, we currently provide:

- [usage.py](./usage.py)
- [usage_dropdowns.py](./usage_dropdowns.py)
- [usage_input.py](./usage_input.py)
- [usage_navigation.py](./usage_navigation.py)

### Datadoc-editor

This package was originally developed for use with Datadoc-editor, so all the components can be seen in action there.

This Github search shows usages of this package in Datadoc-editor: <https://github.com/search?q=repo%3Astatisticsnorway%2Fdatadoc-editor+ssb_dash_components&type=code>

## Contributing

See the [contributer guide](./CONTRIBUTING.md) for instructions on adding new components.

