General
ContextButton
A two-line control that selects the workspace context.
import { ContextButton } from 'faifo-design'ContextButton shows which workspace context is in effect (a company, a branch, a warehouse) on two
lines, with an optional count, and opens the choice of another. The selection is owned by the
server: choosing a context is a navigation or a submitted form, not client state.
#When to use
- Use it for the one context that scopes everything on the screen.
- It is not a record card and not an ordinary command. A one-line command is a
Button; a record summary is aContentCard.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#Context button
Two-line workspace context with server-owned selection and an optional count; it is not a record card.
Show codeHide code
#API
Generated from the package source. A property without a description has none in the source yet.
#ContextButtonComponent
Selects a workspace context with a second line, rather than an ordinary one-line command.
| Property | Description | Type | Default |
|---|---|---|---|
id | – | string | – |
labelrequired | – | string | – |
description | – | string | – |
leading | – | JSXChild | – |
count | – | number | – |
pressed | – | boolean | – |
disabled | – | boolean | – |
name | – | string | – |
value | – | string | – |
#Types
#ContextButtonProps
The properties of ContextButton, listed above.
#Hooks
The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.
context-buttoncontext-button-leadingcontext-button-copy