Skip to content
ShineUI
Install

Fluid

Everything full width.

<sui-fluid>MiscStable

About

Width utility: stacks its children in one column and stretches each to the full row width with one gap. It adds no roles and no wrappers, so labels and tab order are what the fields themselves produce. Use in form layouts where every field should fill the row.

Usage

<sui-fluid gap="14"> <sui-input-text label="Company" name="company" value="Falls City Supply Co."></sui-input-text> <sui-input-text label="EIN" name="ein" value="35-1882210"></sui-input-text> </sui-fluid> <script type="module"> import { defineCustomElements } from "@shineui/core/loader"; import "@shineui/core/shineui.css"; defineCustomElements(); </script>
import { SuiFluid } from "@shineui/react"; import "@shineui/core/shineui.css"; export function Example() { return ( <SuiFluid gap="14"> <sui-input-text label="Company" name="company" value="Falls City Supply Co."></sui-input-text> <sui-input-text label="EIN" name="ein" value="35-1882210"></sui-input-text> </SuiFluid> ); }
<script setup> import { SuiFluid } from "@shineui/vue"; import "@shineui/core/shineui.css"; </script> <template> <SuiFluid gap="14"><sui-input-text label="Company" name="company" value="Falls City Supply Co."></sui-input-text> <sui-input-text label="EIN" name="ein" value="35-1882210"></sui-input-text></SuiFluid> </template>
import { Component } from "@angular/core"; import { SuiFluid } from "@shineui/angular"; @Component({ standalone: true, imports: [SuiFluid], template: `<sui-fluid gap="14"><sui-input-text label="Company" name="company" value="Falls City Supply Co."></sui-input-text> <sui-input-text label="EIN" name="ein" value="35-1882210"></sui-input-text></sui-fluid>`, }) export class Example { }

Basic

Every direct child becomes a block and stretches to the row. Fluid adds nothing around the fields, so their labels, tab order and screen reader output are untouched.

<div style="max-width:380px"> <sui-fluid gap="14"> <sui-input-text label="Company" name="company" value="Falls City Supply Co."></sui-input-text> <sui-input-text label="EIN" name="ein" value="35-1882210"></sui-input-text> </sui-fluid> </div>

Gap

gap is the vertical rhythm in px. 14 matches the form stack; tighten it for a dense side panel and open it up for a settings page.

gap 6
gap 24
<div style="display:flex;gap:24px;flex-wrap:wrap"> <div style="width:220px;display:grid;gap:6px"> <span style="font:460 12px/1.6 var(--font-sans);color:var(--ink-faint)">gap 6</span> <sui-fluid gap="6"> <sui-input-text label="Account" size="sm" value="1010 Cash"></sui-input-text> <sui-input-text label="Class" size="sm" value="Operations"></sui-input-text> </sui-fluid> </div> <div style="width:220px;display:grid;gap:6px"> <span style="font:460 12px/1.6 var(--font-sans);color:var(--ink-faint)">gap 24</span> <sui-fluid gap="24"> <sui-input-text label="Account" size="sm" value="1010 Cash"></sui-input-text> <sui-input-text label="Class" size="sm" value="Operations"></sui-input-text> </sui-fluid> </div> </div>

Mixed controls

Every direct child stretches, inline elements and buttons included. Wrap actions in one element of your own when you want them to keep their natural width.

<div style="max-width:380px"> <sui-fluid> <sui-input-text label="Vendor" value="New Albany Freight"></sui-input-text> <sui-select id="fl-terms" label="Terms"></sui-select> <sui-textarea label="Memo" rows="2" value="Split freight across two invoices."></sui-textarea> <sui-button variant="brand" label="Save vendor"></sui-button> </sui-fluid> </div>
// setup(root): properties and events setup(root) { root.querySelector('#fl-terms').options = [ { label: 'Net 15', value: 'net15' }, { label: 'Net 30', value: 'net30' }, { label: 'Due on receipt', value: 'dor' }, ]; }

In a form

Fluid is layout only: it posts nothing itself, and each field still posts under its own name. Submit to see what the stack sends.

Submit to see what posts.
<form id="fl-form" style="max-width:380px"> <sui-fluid> <sui-input-text label="Customer" name="customer" required value="Falls City Supply"></sui-input-text> <sui-input-text label="Invoice #" name="invoice" value="INV-1043"></sui-input-text> <sui-input-text label="Amount" name="amount" value="4820.00"></sui-input-text> <sui-button type="submit" variant="brand" label="Save invoice"></sui-button> </sui-fluid> <output id="fl-out" style="display:block;margin-top:12px;font:460 13px/1.6 var(--font-sans);color:var(--ink-muted)">Submit to see what posts.</output> </form>
// setup(root): properties and events setup(root) { const form = root.querySelector('#fl-form'); const out = root.querySelector('#fl-out'); form.addEventListener('submit', (e) => { e.preventDefault(); out.textContent = [...new FormData(form)].map(([k, v]) => `${k}=${v || '(empty)'}`).join(' '); }); }

API

<sui-fluid>

Properties

PropertyAttributeTypeDefaultDescription
gapgapnumber14Vertical gap between children in px. 14 matches the form stack.

Slots

SlotDescription
(default)The controls to stretch; each direct child fills the row.

Theming

Every design token this element can render with, read from its own stylesheets and the ones it imports. Set a token on :root or on any ancestor and every use below follows it. The values shown are the ones in the theme you are viewing. The list is read per stylesheet, so an element that imports a shared drawing module lists that module's tokens too, whether or not it paints with all of them.

Typography1

Ag--font-sans

Every name above is listed with its value and its role in Foundations.

See also