Skip to content

← All components

Foundation and layout

Inline

Wrapping horizontal layout with alignment controls.

Live example

OneTwoThree

Usage

Each example includes the complete adapter-specific parameter reference. Copy it as a starting point, then remove options your use case does not need.

React

tsx
import { Inline } from "@cofob/design-system-react";

/**
 * Complete Inline parameter reference.
 * @param gap
 *   type: "none" | "xs" | "sm" | "md" | "lg" | "xl"
 *   default: "md"
 *   example: "lg"
 * @param align
 *   type: "start" | "center" | "end" | "stretch" | "baseline"
 *   default: "center"
 *   example: "center"
 * @param justify
 *   type: "start" | "center" | "end" | "between"
 *   default: "start"
 *   example: "between"
 * @param wrap
 *   type: boolean
 *   default: true
 *   example: true
 * @param children
 *   type: ReactNode | Svelte Snippet | child HTML
 *   default: —
 *   example: children / snippet / child HTML
 */
export function InlineExample() {
  return (
    <Inline>Content</Inline>
  );
}

Svelte

svelte
<script lang="ts">
  import { Inline } from "@cofob/design-system-svelte";

  // Complete Inline parameter reference.
  // gap
  //   type: "none" | "xs" | "sm" | "md" | "lg" | "xl"
  //   default: "md"
  //   example: "lg"
  // align
  //   type: "start" | "center" | "end" | "stretch" | "baseline"
  //   default: "center"
  //   example: "center"
  // justify
  //   type: "start" | "center" | "end" | "between"
  //   default: "start"
  //   example: "between"
  // wrap
  //   type: boolean
  //   default: true
  //   example: true
  // children
  //   type: ReactNode | Svelte Snippet | child HTML
  //   default: —
  //   example: children / snippet / child HTML
</script>

<Inline>Content</Inline>

HTML

html
<!--
  Complete Inline parameter reference.
  gap
    type: "none" | "xs" | "sm" | "md" | "lg" | "xl"
    default: "md"
    example: "lg"
  align
    type: "start" | "center" | "end" | "stretch" | "baseline"
    default: "center"
    example: "center"
  justify
    type: "start" | "center" | "end" | "between"
    default: "start"
    example: "between"
  wrap
    type: boolean
    default: true
    example: true
  children
    type: ReactNode | Svelte Snippet | child HTML
    default: —
    example: children / snippet / child HTML
-->
<div class="cf-inline">Content</div>

Parameters

Adapter differences are explicit. Native element attributes are forwarded in React and Svelte and can be written directly in HTML.

ParameterTypeDefaultAdaptersExampleDescription
gap"none" | "xs" | "sm" | "md" | "lg" | "xl""md"React · Svelte · HTML"lg"Sets token-based space between child elements.
align"start" | "center" | "end" | "stretch" | "baseline""center"React · Svelte · HTML"center"Controls cross-axis alignment.
justify"start" | "center" | "end" | "between""start"React · Svelte · HTML"between"Controls main-axis distribution.
wrapbooleantrueReact · Svelte · HTMLtrueAllows inline children to wrap on narrow viewports.
childrenReactNode | Svelte Snippet | child HTMLReact · Svelte · HTMLchildren / snippet / child HTMLIdiomatic adapter composition content.