Job Board
ProNewA careers board with search, department, location and type filters, job cards, a detail dialog and an application form with sending, sent and error states.
Installation
pnpm dlx shadcn@latest add @viewport/job-board
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 |
|---|---|---|
| jobs* | Job[] | — |
| layout | "grid" | "list" | "compact"`grid` is cards in columns, `list` is wide rows with the salary and actions on the right, `compact` is one line per job. | "grid" |
| title | stringHeading above the board. | — |
| search | booleanShows the search field. | true |
| filters | ("department" | "location" | "type")[]Which dropdown filters to show. Each lists the values found in `jobs`. | ["department", "location", "type"] |
| columns | 2 | 3Most columns in the `grid` layout. | 2 |
| pageSize | numberJobs shown before “Show more”. | 6 |
| loading | booleanShows placeholder cards while the jobs load. | false |
| onApply | (application: JobApplication) => void | Promise<void>Receives the application. Return a promise to show the sending state; reject it to show the error state. | — |
| className | string | — |
Accessibility
- Filters are native selects and the search is labelled; the number of open positions is announced as it changes.
- The job dialog traps focus, closes on Escape and returns focus to the card; moving to the form moves focus to the heading.
- Required fields are marked, errors are tied to their inputs and the first invalid field takes focus.
- A failed submission is announced as an alert and keeps everything you typed. No card rise or dialog scale under reduced motion.