Split Sheet
ProNewWho owns how much of a song: a share per contributor, a bar that shows the parts of the whole, a line that says whether they total 100%, and a button that splits evenly.
Installation
pnpm dlx shadcn@latest add @viewport/split-sheet
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| splits* | Split[] | — |
| onSplitsChange* | (splits: Split[]) => void | — |
| title | stringWhat is being divided, e.g. "Publishing" or "Master royalties". | "Splits" |
| className | string | — |
Accessibility
- Each field is labelled with the contributor's name.
- The total is announced in words as shares change, with an icon as well as a color.
- The bar is described as text for screen readers.
- Fields keep 16px text on phones.