Layout
Inline
Un layout flex horizontal para barras de herramientas, etiquetas y grupos de botones, con ajuste de línea y separadores.
Propósito
Inline coloca a sus hijos en fila: barras de herramientas, listas de etiquetas, grupos de botones,
migas de pan.
Importación
import { Inline } from "@neshel-ui/layout";Uso
Vista previa: inline-toolbar
DraftDesignDocs
import { Badge, Button } from "@neshel-ui/components";
import { Inline } from "@neshel-ui/layout";
export default function InlineToolbar() {
return (
<Inline space="3" justify="between" align="center" wrap>
<Inline space="2" wrap>
<Badge>Draft</Badge>
<Badge variant="outline">Design</Badge>
<Badge variant="outline">Docs</Badge>
</Inline>
<Inline space="2">
<Button size="sm" variant="ghost">
Preview
</Button>
<Button size="sm">Publish</Button>
</Inline>
</Inline>
);
}API
InlineProps
| Prop | Tipo | Predeterminado | Descripción |
|---|---|---|---|
| align | Responsive<MainAxisAlign> | — | — |
| alignX | Responsive<MainAxisAlign> | — | — |
| alignY | Responsive<CrossAxisAlign> | — | — |
| as | LayoutElement | — | — |
| asChild | boolean | — | — |
| justify | Responsive<Justify> | — | — |
| ref | Ref<HTMLElement> | — | — |
| separator | SeparatorProp | — | — |
| space | Responsive<SpaceValue> | — | — |
| spaceX | Responsive<SpaceValue> | — | — |
| spaceY | Responsive<SpaceValue> | — | — |
| wrap | Responsive<boolean> | — | — |
También acepta las props de: React DOM attributes.
alignXcorresponde ajustify-content(start center end) yalignYaalign-items(start center end stretch baseline).justify="between"lleva los grupos a los extremos.wrap(adaptable) permite que los elementos pasen a nuevas líneas; no se puede combinar conseparator.
Errores habituales
- Olvidar
wrapen contenido que puede desbordarse en pantallas pequeñas. - Usar
alignX="between": la distribución esjustify, no un valor de alineación.
Consulta también los separadores de Stack, que funcionan igual en Inline.