Skip to component content
Input044 / 155

LabeledContent

Align a term and its associated value.

Example
Workspace
Personal studio
Status
Ready
Library reference
A-long-workspace-reference-that-wraps-comfortably-on-a-narrow-screen
Source
LabeledContent.tsxtsx
import { Badge, LabeledContent, VStack } from "@/ohmygui";

export default function Example() {
  return (
    <VStack gap="md">
      <LabeledContent label="Workspace" value="Personal studio" />
      <LabeledContent
        label="Status"
        value={
          <Badge variant="success" tone="soft">
            Ready
          </Badge>
        }
      />
      <LabeledContent
        label="Library reference"
        layout="vertical"
        value="A-long-workspace-reference-that-wraps-comfortably-on-a-narrow-screen"
      />
    </VStack>
  );
}