Skip to content

Commit

Permalink
docs(display-and-platform.md): elaborate of AndUp/AndDown
Browse files Browse the repository at this point in the history
  • Loading branch information
MajesticPotatoe committed Mar 14, 2024
1 parent 6675f83 commit b57999b
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions packages/docs/src/pages/en/features/display-and-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,33 @@ If you are still using the Options API, you can access the display information o
</script>
```

<FeaturesBreakpointsTable />

## API

| Component | Description |
| - | - |
| [useDisplay](/api/use-display/) | Composable |

# Thresholds and Breakpoints

Threshold values generate the ranges used for various breakpoints seen throughout vuetify and the `useDisplay` composable. The system uses an "and up" mentality starting from `xs` at 0px. The default threshold values are displayed below.

<FeaturesBreakpointsTable />

These ranges power the various additional `AndUp` / `AndDown` properties accessible in `useDisplay`

```ts
{
smAndDown: boolean // < 960px
smAndUp: boolean // > 600px
mdAndDown: boolean // < 1280px
mdAndUp: boolean // > 960px
lgAndDown: boolean // < 1919px
lgAndUp: boolean // > 1280px
xlAndDown: boolean // < 2559px
xlAndUp: boolean // > 1920px
}
```

## Options

The **useDisplay** composable has several configuration options, such as the ability to define custom values for breakpoints.
Expand Down Expand Up @@ -124,20 +143,20 @@ In the following example, we use a switch statement and the current breakpoint n
```ts
{
// Breakpoints
xs: boolean
sm: boolean
md: boolean
lg: boolean
xl: boolean
xs: boolean // 0 - 595
sm: boolean // 600 - 959
md: boolean // 960 - 1279
lg: boolean // 1280 - 1919
xl: boolean // > 1920
xxl: boolean
smAndDown: boolean
smAndUp: boolean
mdAndDown: boolean
mdAndUp: boolean
lgAndDown: boolean
lgAndUp: boolean
smAndDown: boolean // < 960
smAndUp: boolean // > 600
mdAndDown: boolean // < 1280
mdAndUp: boolean // > 960
lgAndDown: boolean // < 1919
lgAndUp: boolean // > 1280
xlAndDown: boolean
xlAndUp: boolean
xlAndUp: boolean // < 1920

// true if screen width < mobileBreakpoint
mobile: boolean
Expand Down

0 comments on commit b57999b

Please sign in to comment.