Inset
Pads its content on all four sides with one spacing token.
<arc-inset>Overview
Inset pads its content on all four sides with one spacing token. Use it for the space around a block of content, and Stack for the gaps between siblings.
The space prop picks the token. The bleed prop adds a negative margin equal to that padding. Inside a parent padded by the same token, the Inset's box (its background and border) reaches the parent's edges while its content stays where it was.
Guidelines
Do
- Use it for card bodies, dialog content and section interiors
- Use `space="lg"` or `space="xl"` for main content areas and `space="sm"` for compact UI
- Use `bleed` when a block's background should reach past its parent's padding
Don't
- Don't use Inset in place of Container. Container limits width, Inset adds padding
- Don't use `bleed` without a padded parent. The negative margin pushes the box outside it
- Don't hard-code pixel padding. Change the spacing tokens instead
Features
- Each `space` value maps to one token: `--space-xs`, `--space-sm`, `--space-md`, `--space-lg`, `--space-xl` or `--space-2xl`
Preview
Inset space="lg"
Inset space="sm"
Inset space="xl"
Usage
<arc-card>
<arc-inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding from the Inset primitive.</p>
</arc-inset>
</arc-card>
<!-- Bleed mode: image breaks out of parent padding -->
<arc-inset space="lg">
<p>Padded content above</p>
<arc-inset bleed>
<img src="/hero.jpg" alt="Full-width hero" style="width:100%">
</arc-inset>
<p>Padded content below</p>
</arc-inset>import { Inset, Card } from '@arclux/arc-ui-react';
function CardWithInset() {
return (
<Card>
<Inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</Inset>
</Card>
);
}
// Bleed mode
function BleedExample() {
return (
<Inset space="lg">
<p>Padded content above</p>
<Inset bleed>
<img src="/hero.jpg" alt="Full-width hero" style={{ width: '100%' }} />
</Inset>
<p>Padded content below</p>
</Inset>
);
}<script setup>
import { Inset, Card } from '@arclux/arc-ui-vue';
</script>
<template>
<Card>
<Inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</Inset>
</Card>
<!-- Bleed mode -->
<Inset space="lg">
<p>Padded content above</p>
<Inset bleed>
<img src="/hero.jpg" alt="Full-width hero" style="width:100%">
</Inset>
<p>Padded content below</p>
</Inset>
</template><script>
import { Inset, Card } from '@arclux/arc-ui-svelte';
</script>
<Card>
<Inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</Inset>
</Card>
<!-- Bleed mode -->
<Inset space="lg">
<p>Padded content above</p>
<Inset bleed>
<img src="/hero.jpg" alt="Full-width hero" style="width:100%">
</Inset>
<p>Padded content below</p>
</Inset>import { Component } from '@angular/core';
import { Inset, Card } from '@arclux/arc-ui-angular';
@Component({
imports: [Inset, Card],
template: `
<arc-card>
<arc-inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</arc-inset>
</arc-card>
<!-- Bleed mode -->
<arc-inset space="lg">
<p>Padded content above</p>
<arc-inset bleed>
<img src="/hero.jpg" alt="Full-width hero" style="width:100%">
</arc-inset>
<p>Padded content below</p>
</arc-inset>
`,
})
export class InsetExampleComponent {}import { Inset, Card } from '@arclux/arc-ui-solid';
function CardWithInset() {
return (
<Card>
<Inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</Inset>
</Card>
);
}import { Inset, Card } from '@arclux/arc-ui-preact';
function CardWithInset() {
return (
<Card>
<Inset space="lg">
<h3>Card Title</h3>
<p>Content with consistent padding.</p>
</Inset>
</Card>
);
}<!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-inset — requires inset.css + base.css (or arc-ui.css) -->
<div class="arc-inset">
Inset
</div><!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-inset — self-contained, no external CSS needed -->
<div class="arc-inset" style="display: block; padding: 16px">
Inset
</div>API
space'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl''md'- Padding size mapped to a design system spacing token. Controls all four sides equally.
bleedbooleanfalse- When true, applies negative margins equal to the space value, allowing children to break out of a parent container's padding for full-bleed layouts.