https://github.com/hypothesis/frontend-shared
UI components and styles for Hypothesis front-end applications
https://github.com/hypothesis/frontend-shared
Last synced: 9 months ago
JSON representation
UI components and styles for Hypothesis front-end applications
- Host: GitHub
- URL: https://github.com/hypothesis/frontend-shared
- Owner: hypothesis
- Created: 2021-02-17T18:56:16.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-08-12T13:19:35.000Z (11 months ago)
- Last Synced: 2025-08-12T15:23:47.707Z (11 months ago)
- Language: TypeScript
- Homepage: https://patterns.hypothes.is
- Size: 7.92 MB
- Stars: 5
- Watchers: 4
- Forks: 3
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `@hypothesis/frontend-shared`
UI components for Hypothesis front-end applications.
## Installation
Your project must have `preact` and `tailwindcss` as dependencies.
```sh
$ yarn add preact tailwindcss @tailwindcss/postcss
$ yarn add @hypothesis/frontend-shared
```
In your project's CSS entry point, add a `@source` for the frontend-shared
package and import the Tailwind theme:
```css
@import 'tailwindcss' source(none);
/* Configure source files to scan for Tailwind classes. */
@source './node_modules/@hypothesis/frontend-shared/lib/**/*.js';
/* Import theme and utilities from shared package. */
@import '@hypothesis/frontend-shared/tailwind-config.css';
```
## Documentation
Full documentation is available in this project's web-based pattern library.
1. Run the local web server:
```sh
$ make dev
```
2. Visit http://localhost:4001/ in a browser
## Usage
```js
import { Link } from '@hypothesis/frontend-shared';
```
## Additional dev documentation
- [Development guide](docs/developing.md)
- [Release guide](docs/releases.md)
- [Adding examples](docs/examples.md)