Patterns · Dashboard
BigAction
A wide row for one important task, with a large icon, a title, two lines of explanation and either a chevron or a button. Stack a few of them as the "What do you want to do?" list on a website page.
import { BigAction } from '@statix/ui/big-action';Playground
Change texts or images
Class schedule, prices, photos. No password, you land right on your pages.
<BigAction title="Change texts or images" description="Class schedule, prices, photos. No password, you land right on your pages." variant="accent">
{#snippet icon()}<PenLineIcon />{/snippet}
{#snippet action()}<Button>Start editing</Button>{/snippet}
</BigAction>Examples
As a link
Pass href and the whole row becomes a link with a chevron.
Pick a day from the last 30. We back up the current state first, so nothing gets lost.
<script lang="ts">
import { BigAction } from '@statix/ui/big-action';
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
</script>
<div class="w-full max-w-[728px]">
<BigAction
href="#restore"
title="Restore an earlier version"
description="Pick a day from the last 30. We back up the current state first, so nothing gets lost."
>
{#snippet icon()}<RotateCcwIcon />{/snippet}
</BigAction>
</div>With a button
Pass an action snippet when the task starts right away. The button drops below the text on phones.
Change texts or images
Class schedule, prices, photos. No password, you land right on your pages.
<script lang="ts">
import { BigAction } from '@statix/ui/big-action';
import { Button } from '@statix/ui/button';
import PenLineIcon from '@lucide/svelte/icons/pen-line';
</script>
<div class="w-full max-w-[728px]">
<BigAction
variant="accent"
title="Change texts or images"
description="Class schedule, prices, photos. No password, you land right on your pages."
>
{#snippet icon()}<PenLineIcon />{/snippet}
{#snippet action()}<Button href="#edit">Start editing</Button>{/snippet}
</BigAction>
</div>Task list
Stack them with a 12px gap. Mark the recommended task with variant="accent".
Change texts or images
Class schedule, prices, photos. No password, you land right on your pages.
Restore an earlier version
Pick a day from the last 30. We back up the current state first.
Let us make the change
Describe what should change. 30 minutes a month are included in your plan.
<script lang="ts">
import { BigAction } from '@statix/ui/big-action';
import { Button } from '@statix/ui/button';
import HeadsetIcon from '@lucide/svelte/icons/headset';
import PenLineIcon from '@lucide/svelte/icons/pen-line';
import RotateCcwIcon from '@lucide/svelte/icons/rotate-ccw';
</script>
<div class="flex w-full max-w-[728px] flex-col gap-3">
<BigAction
variant="accent"
title="Change texts or images"
description="Class schedule, prices, photos. No password, you land right on your pages."
>
{#snippet icon()}<PenLineIcon />{/snippet}
{#snippet action()}<Button href="#edit">Start editing</Button>{/snippet}
</BigAction>
<BigAction
title="Restore an earlier version"
description="Pick a day from the last 30. We back up the current state first."
>
{#snippet icon()}<RotateCcwIcon />{/snippet}
{#snippet action()}<Button variant="outline" href="#restore">Choose a backup</Button>{/snippet}
</BigAction>
<BigAction
title="Let us make the change"
description="Describe what should change. 30 minutes a month are included in your plan."
>
{#snippet icon()}<HeadsetIcon />{/snippet}
{#snippet action()}<Button variant="outline" href="#request">Request a change</Button>{/snippet}
</BigAction>
</div>Guidelines
Do
- Phrase titles the way a customer would ask: "Change texts or images", "Restore an earlier version".
- Use the description to remove doubt: how long it takes, what we do first, what it costs.
- Use a primary button only on the accent row and outline buttons elsewhere.
Don't
- Don’t mix chevron rows and button rows in one list.
- Don’t use BigAction in grids. For grids, use ActionTile.
Accessibility
- In link mode the title is the link. A ::after layer stretches it over the row, so the link name is the title only.
- In action mode the row itself is not interactive; only your button is.
- Set headingLevel when the rows form a section outline. By default the title is a paragraph.
API reference
BigAction
renders<div> and accepts its attributes| Prop | Type | Default |
|---|---|---|
title * | string The task. | – |
description | string What happens next. | – |
variant | 'default' | 'accent' accent tints the icon well blue. | 'default' |
href | string Makes the row a link. Ignored when action is set. | – |
headingLevel | 2 | 3 | 4 Renders the title as a heading. Without it the title is a <p>. | – |
icon | Snippet Icon inside the 56px well. | – |
action | Snippet Trailing control, usually one Button. | – |
ref bind | HTMLDivElement | null The root element. | – |
class | ClassValue Merged with the row classes; yours win. | – |
| Data attribute | Meaning |
|---|---|
data-slot="big-action" | Root. Parts use big-action-icon, -text, -title, -link, -description, -action. |
bigActionVariants
The tailwind-variants slots behind BigAction.