@dscout/strata
v0.5.0
Published
A shared component library for building Tailwind based Dscout interfaces
Readme
@dscout/strata
A shared React component library for building Tailwind based dscout interfaces. The primary consumer is Figma Make, which uses real React components from npm in prototypes.
Installation
npm install @dscout/strataPeer dependencies
React 18+ is required:
npm install react react-domUsage
// CSS (required — contains all Tailwind utilities and design tokens)
import '@dscout/strata/styles.css';
// Barrel import
import { Button, Modal } from '@dscout/strata';
// Or per-component subpath import
import Button from '@dscout/strata/button';Components
Buttons & inputs
Button,ButtonWithTooltipAndPopover,PillButton,PromptButton,SendButton,SourceButtonCheckboxInput,RadioInput,Switch(+SwitchColortype)TextInput,TextareaDatepickerSelect
Surfaces & layout
ModalPopover,PopoverMenu,PopoverMenuItemTooltipContainer,TooltipProviderCalloutCollapsibleContentScrollFadeContainerResizeHandle,useResizeHandleWorkspaceLayout,useWorkspaceLayout,useNavState(plusWorkspacePane,WorkspaceState,WorkspaceAction,WorkspaceLayoutHandle,WorkspaceLayoutProps,PrimaryHeaderProps,SecondaryHeaderProps,PaneProps,NavPropstypes)
Chat & command surfaces
ChatMessage,ChatMessagesArea,ChatThinkingIndicator,MessageTextareaCommandMenu(compound:.Search,.Filters,.List,.Item),CommandAnchoredMenu,CommandPopover
Text & rich content
Markdown— opinionatedMarkdownRenderer(@dscout/strata/markdown). The individual block renderers are exposed too as drop-incomponents={...}overrides:BasicMarkdownRenderer,MarkdownBlockquote,MarkdownCode,MarkdownListItem,MarkdownParagraph.FormattedTextarea,MentionSuggestionList
Tabs
Tabs,TabsDropdown,TabsDropdownItem,FilterTabs,NavTabs,NavTabsDropdown,NavTabsDropdownItem. Available as subpath imports (@dscout/strata/tabs,@dscout/strata/tabs/filter,@dscout/strata/tabs/nav, …).
Notifications & status
ToastContainer,ToastActions,useToastStoreLoadingDots,LoadingSpinner,LogoLoader,SkeletonLoader,TypingIndicator
Miscellaneous
ChipFeedbackSelectorProfileDropdownQuestionIndicatorResourceItem,ResourceItemButtonUserAvatar
All components are available as both barrel imports from the package root (import { CommandMenu } from "@dscout/strata") and individual subpath imports (import CommandMenu from "@dscout/strata/command-menu"). Subpaths use kebab-case and mirror the source folder, e.g. @dscout/strata/popover/menu-item, @dscout/strata/command-menu/anchored, @dscout/strata/markdown/blockquote.
Browse interactive examples in the Storybook.
Intentionally internal
Some primitives in the Strata source tree are deliberately not exposed via this package. External consumers should compose around the public primitives instead:
- Component-folder
internals/. Strata's complex component folders (chat/,workspace_layout/,markdown/,scroll_fade_container/,command_menu/,tabs/, …) keep implementation detail under aninternals/subdirectory — editor wiring, popover shells, suggestion-extension factories, reducers, FSM machinery, layout shells, etc. None of those modules ship as package entry points, and the in-repo ESLint ruledscout/no-strata-internals-cross-folderenforces the boundary at build time. If you find yourself wanting to reach into aninternals/module, that's a signal that the public surface is missing something — open an issue rather than working around it. ResourceItem/ResourceItemButton— subgrid mode is internal. Both components are exposed and render with their default flex layout out of the box. The mechanism that auto-activates leading / title / trailing alignment across a list of rows — theResourceItemListProvidercontext and matching parent grid template — is not exported. External consumers will get the standalone (flex) behavior; the aligned-list behavior lives behind a follow-up primitive (e.g. a futureResourceItemListthat bundles the parent grid + provider). Until that lands, this is the supported public contract.CheckboxIndicator— prop-driven visual sibling ofCheckboxInput. Exists to deduplicate the checkbox visual contract betweenCheckboxInputand<button>-rooted Items (e.g.CommandMenu.Item), both of which live inside this monorepo. External Strata consumers should useCheckboxInputfor real form input.ErrorBoundaryand friends. Depend on@datadog/browser-rum-react, which is app-specific and not appropriate for the package.
