Skip to content
SENVENLI UI

Pressable

A Box that is a button or a link as a whole, for custom tiles and rows.
A pressable tile
import { Pressable } from "@senvenli/react/action";

Examples

Disabled

Dimmed, and it takes no press or focus.

Guidelines

When to use it

  • A custom-designed tile or row must be pressable.

Use something else when

  • A standard interactive card fits. Card

Accessibility

Keyboard

KeysWhat happens
Enter, SpacePresses it (Enter only for links).

Built in

  • Real button or link semantics with the inner focus border.

You provide

  • An accessible name from its text or aria-label.

API reference

Pressable

padding
Space
paddingInline
Space
paddingBlock
Space
background
Background
radius
Radius
shadow
Shadow
border
Border
fullWidth
booleanDefault true

As wide as its container (default true), as a button or a link; false hugs what it holds.

children
React.ReactNode
isDisabled
boolean
aria-label
string

Required when the content has no text that names the action.

id
string
onPress
(event: PressEvent) => void
href
string

Also takes 3 standard DOM and ARIA attributes (id, aria-label, event handlers…).