bsky-app/src/alf
Eric Bailey ddda612c11
Fix border on some listing screens (#5115)
* Fix border on PostQuotes, add debug atom

* Add util_screen_outer, apply to h_full_vh here needed
2024-09-03 13:50:48 -05:00
..
util [ALF] Theme & palette cleanup (#4769) 2024-07-11 16:59:12 -05:00
README.md Application Layout Framework (#1732) 2024-01-08 19:43:56 -06:00
atoms.ts Fix border on some listing screens (#5115) 2024-09-03 13:50:48 -05:00
index.tsx Tweak rendering of top headers so they always appear even during load (#4982) 2024-08-30 00:20:46 -07:00
themes.ts Improve styles (#4916) 2024-08-11 14:30:18 -07:00
tokens.ts [ALF] Theme & palette cleanup (#4769) 2024-07-11 16:59:12 -05:00
types.ts [ALF] Theme & palette cleanup (#4769) 2024-07-11 16:59:12 -05:00

README.md

Application Layout Framework (ALF)

A set of UI primitives and components.

Usage

Naming conventions follow Tailwind — delimited with a _ instead of - to enable object access — with a couple exceptions:

Spacing

Uses "t-shirt" sizes xxs, xs, sm, md, lg, xl and xxl instead of increments of 4px. We only use a few common spacings, and otherwise typically rely on many one-off values.

Text Size

Uses "t-shirt" sizes xxs, xs, sm, md, lg, xl and xxl to match our type scale.

Line Height

The text size atoms also apply a line-height with the same value as the size, for a 1:1 ratio. tight and normal are retained for use in the few places where we need leading.

Atoms

An (mostly-complete) set of style definitions that match Tailwind CSS selectors. These are static and reused throughout the app.

import { atoms } from '#/alf'

<View style={[atoms.flex_row]} />

Theme

Any values that rely on the theme, namely colors.

const t = useTheme()

<View style={[atoms.flex_row, t.atoms.bg]} />

Breakpoints

const b = useBreakpoints()

if (b.gtMobile) {
  // render tablet or desktop UI
}