Home / Function/ default.width() — tailwindcss Function Reference

default.width() — tailwindcss Function Reference

Architecture documentation for the default.width() function in default-theme.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  c4e883ec_0bdf_5e82_73d4_62173277ab13["default.width()"]
  1b5321a5_0fcc_2351_1f22_0d4bed4c097e["default-theme.ts"]
  c4e883ec_0bdf_5e82_73d4_62173277ab13 -->|defined in| 1b5321a5_0fcc_2351_1f22_0d4bed4c097e
  style c4e883ec_0bdf_5e82_73d4_62173277ab13 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/compat/default-theme.ts lines 1080–1118

  width: ({ theme }) => ({
    auto: 'auto',

    '1/2': '50%',
    '1/3': '33.333333%',
    '2/3': '66.666667%',
    '1/4': '25%',
    '2/4': '50%',
    '3/4': '75%',
    '1/5': '20%',
    '2/5': '40%',
    '3/5': '60%',
    '4/5': '80%',
    '1/6': '16.666667%',
    '2/6': '33.333333%',
    '3/6': '50%',
    '4/6': '66.666667%',
    '5/6': '83.333333%',
    '1/12': '8.333333%',
    '2/12': '16.666667%',
    '3/12': '25%',
    '4/12': '33.333333%',
    '5/12': '41.666667%',
    '6/12': '50%',
    '7/12': '58.333333%',
    '8/12': '66.666667%',
    '9/12': '75%',
    '10/12': '83.333333%',
    '11/12': '91.666667%',
    full: '100%',
    screen: '100vw',
    svw: '100svw',
    lvw: '100lvw',
    dvw: '100dvw',
    min: 'min-content',
    max: 'max-content',
    fit: 'fit-content',
    ...theme('spacing'),
  }),

Domain

Subdomains

Frequently Asked Questions

What does default.width() do?
default.width() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/compat/default-theme.ts.
Where is default.width() defined?
default.width() is defined in packages/tailwindcss/src/compat/default-theme.ts at line 1080.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free